By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,588 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

Learning Python on jEdit

P: n/a
Ray
I want to jump in a learn Python. I have spent about a day looking at
editors and IDEs and (probably prematurely) selected jEdit to work in.
I have downloaded Python and jEdit. I have been going over jEdit for
a while and can't real see how to get it to know that I am using
Python.

So there is more there than I expected. Any suggestions on how to
configure (plugg-ins?) for jEdit and learn Python?

Ray
Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Ray <rt******@ev1.net> pisze:
I want to jump in a learn Python. I have spent about a day looking at
editors and IDEs and (probably prematurely) selected jEdit to work in.
I have downloaded Python and jEdit. I have been going over jEdit for
a while and can't real see how to get it to know that I am using
Python.


jEdit detects file type by extension, so Python syntax highlighting
will not work until you save the file with py or pyw extension.

--
Jarek Zgoda
http://jpa.berlios.de/
Jul 18 '05 #2

P: n/a

"Jarek Zgoda" <jz****@gazeta.usun.pl> wrote in message
news:c1**********@nemesis.news.tpi.pl...
[snip]
jEdit detects file type by extension, so Python syntax highlighting
will not work until you save the file with py or pyw extension.


Actually you can set the edit mode manually as well:

http://www.jedit.org/users-guide/mod...mode-selection

"""
The edit mode can be specified manually as well. The current buffer's edit
mode can be set on a one-time basis in the Utilities>Buffer Options dialog
box;
"""

Plus you can set the default edit mode to python, so that when you create a
new file it's already in python-mode.
Ray:

You may want to use the plug-in manager[1] to get the console plug-in so you
can run your programs from within the IDE. You may also appreciate the
Jython plug-in. Peronally, I like having the BufferTabs plug-in as well. I
actually tend to use Komodo for Python, but I have jEdit installed for
programming in several other languages and I'm pretty happy with it. Enjoy.

Sean
[1] http://www.jedit.org/users-guide/using-plugins.html

Jul 18 '05 #3

P: n/a
rt******@ev1.net (Ray) wrote in message news:<d4*************************@posting.google.c om>...
I want to jump in a learn Python. I have spent about a day looking at
editors and IDEs and (probably prematurely) selected jEdit to work in.
I have downloaded Python and jEdit.
Even though I love jEdit, its Python-awareness isn't as good as that
of a Python-specific IDE. Since you're in the process of learning
Python, I recommend that you use as your interactive console an editor
that has Python object member pop-ups and parameter tips (e.g.,
Pythonwin, or OrbTech's PyShell (which comes with wxPython)). I use
PyShell as my interactive console and jEdit as my main editor.

I edit Python and C/C++ source code for many hours a day with jEdit,
and have been doing so since 1999, so obviously I regard jEdit as a
suitable editor for Python source. IMO, jEdit's most compelling
(though not unique) features are code folding, HyperSearch, multiple
views/split views, and markers. My workstation has multiple monitors,
and I can spread several semi-autonomous 'views' from a single
instance of jEdit across them to simultaneously view several pieces of
code at once. Markers (with appropriate Back/Set/Forward keyboard
shortcuts) allow me to hop around huge source files without touching
the mouse.
I have been going over jEdit for a while and can't real see how to get it
to know that I am using Python.
In the Utilities->Global Options->Editing dialog (of jEdit 4.1), you
can change Python-specific settings by selecting 'Python' from the
'Change settings for mode' drop-down. I have mine set to 'Tab width':
4, 'Indent width': 4, 'Soft (emulated with spaces) tabs': yes. Save
yourself some hassle and don't mix tabs and spaces in your Python
source code. jEdit can paper over the difference between soft and
hard tabs, so there are no extra keypresses required.

This dialog also allows you to specify which filename extensions are
to be considered Python source files, or which textual pattern on the
first line of a source file indicates same (e.g., '#/usr/bin/env
python').

If you use jEdit for virtually nothing other than editing Python
source, you can set Python mode as the default via the 'Default Edit
Mode' option in that same Utilities->Global Options->Editing dialog.
So there is more there than I expected. Any suggestions on how to
configure (plugg-ins?) for jEdit and learn Python?


jEdit's indentation-based code folding works very well with Python out
of the box.

Since Python has syntactically significant whitespace, jEdit's
Whitespace plugin is a real help. In particular, turn on
Utilities->Global Options->Plugins->Whitespace->Fold guides->Show fold
guides by default. I have Whitespace set to display a faint grey
vertical line along Python indentation planes.

jEdit also has a Jython plugin, which, among other capabilities,
allows you to write jEdit macros in Python. There's also a plugin
called Py Utils, but I haven't used it.
Jul 18 '05 #4

P: n/a
Ray
David,

Thanks for all the details, I have a few questions.

You mentioned that jEdit is not Python specific and that others may be
more appropriate for learning. Later, you addressed how to get jEdit
to recognize Python. Are you saying that even with the Python
plug-ins and options, the Python only IDEs would be better for
learning?

I looked at PyShell and Pythonwin. The documentation says that
Pythonwin was designed for MFC. I found no mention to MFC. What's up
with MFC and how relevent is it?

Ray

wo**********@rocketmail.com (David Rushby) wrote in message news:<78**************************@posting.google. com>...
rt******@ev1.net (Ray) wrote in message news:<d4*************************@posting.google.c om>...
I want to jump in a learn Python. I have spent about a day looking at
editors and IDEs and (probably prematurely) selected jEdit to work in.
I have downloaded Python and jEdit.


Even though I love jEdit, its Python-awareness isn't as good as that
of a Python-specific IDE. Since you're in the process of learning
Python, I recommend that you use as your interactive console an editor
that has Python object member pop-ups and parameter tips (e.g.,
Pythonwin, or OrbTech's PyShell (which comes with wxPython)). I use
PyShell as my interactive console and jEdit as my main editor.

I edit Python and C/C++ source code for many hours a day with jEdit,
and have been doing so since 1999, so obviously I regard jEdit as a
suitable editor for Python source. IMO, jEdit's most compelling
(though not unique) features are code folding, HyperSearch, multiple
views/split views, and markers. My workstation has multiple monitors,
and I can spread several semi-autonomous 'views' from a single
instance of jEdit across them to simultaneously view several pieces of
code at once. Markers (with appropriate Back/Set/Forward keyboard
shortcuts) allow me to hop around huge source files without touching
the mouse.
I have been going over jEdit for a while and can't real see how to get it
to know that I am using Python.


In the Utilities->Global Options->Editing dialog (of jEdit 4.1), you
can change Python-specific settings by selecting 'Python' from the
'Change settings for mode' drop-down. I have mine set to 'Tab width':
4, 'Indent width': 4, 'Soft (emulated with spaces) tabs': yes. Save
yourself some hassle and don't mix tabs and spaces in your Python
source code. jEdit can paper over the difference between soft and
hard tabs, so there are no extra keypresses required.

This dialog also allows you to specify which filename extensions are
to be considered Python source files, or which textual pattern on the
first line of a source file indicates same (e.g., '#/usr/bin/env
python').

If you use jEdit for virtually nothing other than editing Python
source, you can set Python mode as the default via the 'Default Edit
Mode' option in that same Utilities->Global Options->Editing dialog.
So there is more there than I expected. Any suggestions on how to
configure (plugg-ins?) for jEdit and learn Python?


jEdit's indentation-based code folding works very well with Python out
of the box.

Since Python has syntactically significant whitespace, jEdit's
Whitespace plugin is a real help. In particular, turn on
Utilities->Global Options->Plugins->Whitespace->Fold guides->Show fold
guides by default. I have Whitespace set to display a faint grey
vertical line along Python indentation planes.

jEdit also has a Jython plugin, which, among other capabilities,
allows you to write jEdit macros in Python. There's also a plugin
called Py Utils, but I haven't used it.

Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.