Python editors for Windows question

D

Dustin

Hello,

I just started programming in Python last night, and I've really enjoyed my
experience so far. I would like to know if there is a Windows editor that
recognizes Python and will support a module syntax/definition lists For
instance, let's say that I set form = cgi and then when I hit the period
(".") on the keyboard, a list of objects shows up, such as FieldStorage(),
etc.. Any suggestions are appreciated. Thank you!

Dustin
 
P

Peter Hansen

Dustin said:
I just started programming in Python last night, and I've really enjoyed my
experience so far. I would like to know if there is a Windows editor that
recognizes Python and will support a module syntax/definition lists For
instance, let's say that I set form = cgi and then when I hit the period
(".") on the keyboard, a list of objects shows up, such as FieldStorage(),
etc.. Any suggestions are appreciated. Thank you!

SciTE can handle that: http://scintilla.sourceforge.net/SciTE.html
So can practically every other halfway decent editor these days,
most likely.

-Peter
 
M

Mike C. Fletcher

PythonWin (part of the pywin32/win32all package) has limited
autocomplete. Basically it will auto-complete for modules which are
loaded, so if you import cgi in the interactive session then you will
have autocompletion for cgi. If the module is not loaded, then PythonWin
uses a simpler algorithm that searches through the current file looking
for x.y notations where x matches your currently-begun x.

PythonWin also has very nice ctrl+space identifier completion which
searches back/forward from where you're typing, so you can type longer
identifiers with just a few keystrokes.

Would be nice to have that same set of mechanisms in all Python
editors. I believe Boa has auto-completion in much the same way. Not
sure about the other win32 editors. I think the Activestate IDEs may
have auto-completion, but again, not sure.

Good luck and welcome,
Mike
Hello,

I just started programming in Python last night, and I've really enjoyed my
experience so far. I would like to know if there is a Windows editor that
recognizes Python and will support a module syntax/definition lists For
instance, let's say that I set form = cgi and then when I hit the period
(".") on the keyboard, a list of objects shows up, such as FieldStorage(),
etc.. Any suggestions are appreciated. Thank you!

Dustin
_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/
 
G

Gabriel Cooper

Komodo will do it. It will even autocomplete custom class information.
For example, if I type:

x.y.z = 5

the next time I type x. it will autocomplete (suggest) that I add 'y'
and so on. (woooo, aahhhhhh...)
 
M

Marco Aschwanden

The best auto-completion you can get for Python is: WingIde
http://wingide.com/

Normally WingIDE is quite good at auto-completion but sometimes it needs
some help:

if wingIde does not "recognize" a class you may add:

assert isinstance(btnHello, wxButton)

and after that point it will handle this for you too...

Good luck,
Marco
 
L

Lothar Scholz

Marco Aschwanden said:
The best auto-completion you can get for Python is: WingIde
http://wingide.com/

Normally WingIDE is quite good at auto-completion but sometimes it needs
some help:

if wingIde does not "recognize" a class you may add:

assert isinstance(btnHello, wxButton)

and after that point it will handle this for you too...

But keep in mind that auto-completion is by concepts miles away from
what you see in Java. The problem for us who try to implement this
feature is always that most people don't understand why this is
impossible in a dynamically typed language.
 
J

Josiah Carlson

But keep in mind that auto-completion is by concepts miles away from
what you see in Java. The problem for us who try to implement this
feature is always that most people don't understand why this is
impossible in a dynamically typed language.

Not quite impossible, but very difficult. It is impossible in a
practical sense for editors that don't use a parser capable of creating
an abstract syntax tree (generally compiler.ast or the tokenizer module
are used in editors written in Python).

Furthermore, it usually involves questions like "how many levels of
imports should we deal with, and how much namespace emulation should be
done", which involves potentially expensive namespace creation,
modification, and later recreation ("from module import *" becoming
"import module" being one of them) in more than a single level of
namespace. Quite an ugly problem that you're hard-pressed to find an
editor (for dynamically typed languages) with a decent implementation.

WingIDE's method for getting past some inference checks is nifty, though
I would be a bit irked if I used autocompletion (I don't) and needed to
pepper my code with (unneeded) assert statements just to get it to work
all the time.

- Josiah
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top