IDE Python

Discussion in 'Python' started by jean.kasapyan, Sep 30, 2003.

  1. Hello,
    I search Python IDE with Code Intellisense

    Thanks
    JEAN
    jean.kasapyan, Sep 30, 2003
    #1
    1. Advertising

  2. jean.kasapyan wrote:
    > Hello,
    > I search Python IDE with Code Intellisense


    There are various:
    http://www.python.org/cgi-bin/moinmoin/IntegratedDevelopmentEnvironments

    I've seen PythonWin, Komodo, WingIde.
    (but I'm using vim/UltraEdit myself... and sometimes PythonWin.)

    But keep in mind that powerful 'intellisense'
    is impossible in such a dynamic language as Python...

    --Irmen
    Irmen de Jong, Sep 30, 2003
    #2
    1. Advertising

  3. jean.kasapyan wrote:

    > I search Python IDE with Code Intellisense


    You did not specify which platform, but if you develop on
    the Windows platform the latest version of Zeus does this.

    Once you create a Zeus workspace, Zeus will automatically
    run ctags to produce a tags database, will populate a class
    tree with this data and it also the tags information for
    code intellisensing:

    http://www.zeusedit.com/lookclass.html

    Jussi Jumppanen
    Author of: Zeus for Windows (All new version 3.90 out now)
    "The C/C++, Cobol, Java, HTML, Python, PHP, Perl programmer's editor"
    Home Page: http://www.zeusedit.com
    Jussi Jumppanen, Oct 1, 2003
    #3
  4. jean.kasapyan

    F. GEIGER Guest

    "Irmen de Jong" <> schrieb im Newsbeitrag
    news:3f79f9b0$0$58706$4all.nl...
    > jean.kasapyan wrote:
    > > Hello,
    > > I search Python IDE with Code Intellisense

    >
    > There are various:
    > http://www.python.org/cgi-bin/moinmoin/IntegratedDevelopmentEnvironments
    >
    > I've seen PythonWin, Komodo, WingIde.
    > (but I'm using vim/UltraEdit myself... and sometimes PythonWin.)
    >
    > But keep in mind that powerful 'intellisense'
    > is impossible in such a dynamic language as Python...


    WingIDE does a considerable good job here. It "intellisenses" all methods of
    an object, if it knows its type. If you come from C++ you will ensure that
    "automatically".

    class LittleKid:
    def openDoor(self, visitor):
    assert isinstance(visitor, Goat) # Ensure it's ma and not the wolf
    # From here Wing IDE knows that visitor is a Goat and not a Wolf

    The next version is said to support calltips.

    Kind Regards
    Franz GEIGER


    >
    > --Irmen
    >
    F. GEIGER, Oct 1, 2003
    #4
  5. Jussi Jumppanen wrote:
    > jean.kasapyan wrote:
    >
    >
    >>I search Python IDE with Code Intellisense

    >
    >
    > You did not specify which platform, but if you develop on
    > the Windows platform the latest version of Zeus does this.
    >
    > Once you create a Zeus workspace, Zeus will automatically
    > run ctags to produce a tags database, will populate a class
    > tree with this data and it also the tags information for
    > code intellisensing:
    >
    > http://www.zeusedit.com/lookclass.html


    I just downloaded and installed Zeus, but it didn't have any
    intellisense. I opened a .py file but it didn't add the class listing.
    Also it failed to compile and execute it. It seems that it only has
    syntax highlighting out of the box.

    Harri
    Harri Pesonen, Oct 1, 2003
    #5
  6. jean.kasapyan

    Bryan Guest

    Harri Pesonen wrote:
    > Jussi Jumppanen wrote:
    >
    >> jean.kasapyan wrote:
    >>
    >>
    >>> I search Python IDE with Code Intellisense

    >>
    >>
    >>
    >> You did not specify which platform, but if you develop on the Windows
    >> platform the latest version of Zeus does this.
    >>
    >> Once you create a Zeus workspace, Zeus will automatically run ctags to
    >> produce a tags database, will populate a class tree with this data and
    >> it also the tags information for code intellisensing:
    >> http://www.zeusedit.com/lookclass.html

    >
    >
    > I just downloaded and installed Zeus, but it didn't have any
    > intellisense. I opened a .py file but it didn't add the class listing.
    > Also it failed to compile and execute it. It seems that it only has
    > syntax highlighting out of the box.
    >
    > Harri
    >
    >


    would you consider SPE as having intellisense?
    http://spe.pycs.net/

    i've been using this editor for about a week now and i'm very impressed.

    bryan
    Bryan, Oct 2, 2003
    #6
  7. Irmen de Jong <> wrote in message news:<3f79f9b0$0$58706$4all.nl>...
    > But keep in mind that powerful 'intellisense'
    > is impossible in such a dynamic language as Python...


    I wouldn't say so. Autocomplete just needs to be a bit more
    intelligent than in statically typed languages. At first, it
    could search all class definitions for method names. Then
    at first it could only help you when typing long variable
    names since they can be pretty unique across different
    types - And completing long names is where autocomplete
    is most useful anyway. After you called one or two methods
    for a certain type, it could narrow down the
    possibilities of what type the variable is,
    or possibly nail it down to some specific type right
    away. The auto-complete could memoize the types
    you use often and have preference for those types. It could
    also memoize patterns in variable names and then figure that
    if the variable name has "text" or "name" etc. in it, it's
    more probably a string object, since that's how the programmer
    indicated string-like objects earlier too. And similarly if
    you have two variables named 'internal_buffer' at different
    parts of your program, they're likely the same type.

    Then it could also search code and look where some functions
    are actually called. The call site often has more info of
    the types being used. Functions in a single module often
    work with similar types too, so the auto-complete tool could have
    preference to the types used (already deduced) in the current module.

    All in all, I believe a very powerful autocomplete tool is possible
    in a dynamically typed language. After all, we as humans know what
    the types often are and what methods we will want to call for the
    parameter objects. An auto-complete-tool can try to archieve
    the same (without having to plug into our brains and read our
    thoughts, mind you).

    What dynamic typing lacks though, is 100% reliability of the type.
    Auto-complete-tool could be correct 95% of time and it wouldn't really
    matter if it sometimes did a mistake. But automatic refactoring tools
    are something that can't make mistakes, since they often
    have to deal with so many renamings. Bicycle Repair Man (Python
    refactoring tool) also often says "50% chance" and the like
    for variable names that it can't deduce with certanity. Perhaps
    there's no cure for that, unless the refactoring tool is
    some super-smart AI.
    Hannu Kankaanp??, Oct 2, 2003
    #7
  8. Harri Pesonen wrote:

    > > Once you create a Zeus workspace, Zeus will automatically
    > > run ctags to produce a tags database, will populate a class
    > > tree with this data and it also the tags information for
    > > code intellisensing:
    > >
    > > http://www.zeusedit.com/lookclass.html

    >
    > I just downloaded and installed Zeus, but it didn't have any
    > intellisense. I opened a .py file but it didn't add the class
    > listing.


    Zeus uses ctags to automatically generate the tags for you project
    files. Zeus also use these tags to do the intellisensing.

    But for Zeus to know what files are in your project you need
    to create a project workspace. So to do this you would do
    the following:

    Workspace, New menu
    Mouse right click and add the *.py files to the
    source folder of the workspace

    Now the class informat for the python files will be in the
    class browser.

    So for example assuming this file was added to a workspace:

    class Example:
    def a_method(self, string, variable):

    now if I create a new file as start to type in this code:

    Example test
    test.

    the '.' character will trigger the intellisense and a list of
    all the method for Example will be displayed.

    > Also it failed to compile and execute it.


    To run the compiler you do need to tell Zeus where you compiler
    is located and this can be done using the Options Compiler menu.

    Cheers Jussi
    Jussi Jumppanen, Oct 2, 2003
    #8
  9. Bryan wrote:
    > Harri Pesonen wrote:
    >> Jussi Jumppanen wrote:
    >>> jean.kasapyan wrote:
    >>>
    >>>> I search Python IDE with Code Intellisense
    >>>
    >>> You did not specify which platform, but if you develop on the Windows
    >>> platform the latest version of Zeus does this.
    >>>
    >>> Once you create a Zeus workspace, Zeus will automatically run ctags
    >>> to produce a tags database, will populate a class tree with this data
    >>> and it also the tags information for code intellisensing:
    >>> http://www.zeusedit.com/lookclass.html

    >>
    >> I just downloaded and installed Zeus, but it didn't have any
    >> intellisense. I opened a .py file but it didn't add the class listing.
    >> Also it failed to compile and execute it. It seems that it only has
    >> syntax highlighting out of the box.
    >>
    >> Harri

    >
    > would you consider SPE as having intellisense?
    > http://spe.pycs.net/
    >
    > i've been using this editor for about a week now and i'm very impressed.


    It is much better, but seems to be a bit buggy. The first thing I tried is

    re.

    which opens a list of re attributes, fine, but when I hit "c" for
    "compile", the list just closes. When I write

    string.

    the list opens and when I press "c" the list scrolls to "capitalize" as
    expected. Also when I complete it and press (, it shows the doc string,
    great.

    Still it does not understand that "asdf" is a string so

    "asdf".

    should show string methods. Also if I write

    reo = re.compile(r"#define\s+Py_None.*\n")

    it should know that reo is a regular expression object. It should try at
    least. :) Simpler example:

    string.upper().

    and it shows nothing.

    There are some real problems as well, the Shell window does not paint
    correctly always. Overall, buggy but promising.

    Harri
    Harri Pesonen, Oct 2, 2003
    #9
  10. > reo = re.compile(r"#define\s+Py_None.*\n")
    >
    > it should know that reo is a regular expression object. It should try at
    > least. :) Simpler example:
    >
    > string.upper().
    >
    > and it shows nothing.


    The first could be done as a heuristic. The second is not easily
    possible in an untyped language. And i guess no other IDE for any
    script language can do this. Maybe they can do it for a few standart
    functions but not in general.

    Choosing python has advantages and disadvantages.
    Lothar Scholz, Oct 3, 2003
    #10
  11. Jussi Jumppanen wrote:
    > Harri Pesonen wrote:
    >
    >
    >>>Once you create a Zeus workspace, Zeus will automatically
    >>>run ctags to produce a tags database, will populate a class
    >>>tree with this data and it also the tags information for
    >>>code intellisensing:
    >>>
    >>> http://www.zeusedit.com/lookclass.html

    >>
    >>I just downloaded and installed Zeus, but it didn't have any
    >>intellisense. I opened a .py file but it didn't add the class
    >>listing.

    >
    > Zeus uses ctags to automatically generate the tags for you project
    > files. Zeus also use these tags to do the intellisensing.
    >
    > But for Zeus to know what files are in your project you need
    > to create a project workspace. So to do this you would do
    > the following:
    >
    > Workspace, New menu
    > Mouse right click and add the *.py files to the
    > source folder of the workspace
    >
    > Now the class informat for the python files will be in the
    > class browser.


    Oh yes, got it now.

    > So for example assuming this file was added to a workspace:
    >
    > class Example:
    > def a_method(self, string, variable):
    >
    > now if I create a new file as start to type in this code:
    >
    > Example test
    > test.
    >
    > the '.' character will trigger the intellisense and a list of
    > all the method for Example will be displayed.


    OK, so it has limited intellisense. Still PythonWin has better
    intellisense, because it knows what you have imported in the beginning
    and can show those as well.

    >>Also it failed to compile and execute it.

    >
    > To run the compiler you do need to tell Zeus where you compiler
    > is located and this can be done using the Options Compiler menu.


    It would be great to have a built in support for Python. Zeus could
    check the Python installation folder from registry and configure itself
    automatically.

    $95 is probably too much for home user. Zeus seems to be a very
    professional editor, with Source Safe integration and all. But I think
    that PyhonWin is a better choice, because it is ready for Python
    (obviously), has integrated debugger, limited intellisense, and is free.

    Harri
    Harri Pesonen, Oct 3, 2003
    #11
  12. Lothar Scholz wrote:

    >>reo = re.compile(r"#define\s+Py_None.*\n")
    >>
    >>it should know that reo is a regular expression object. It should try at
    >>least. :) Simpler example:
    >>
    >>string.upper().
    >>
    >>and it shows nothing.

    >
    > The first could be done as a heuristic. The second is not easily
    > possible in an untyped language. And i guess no other IDE for any
    > script language can do this. Maybe they can do it for a few standart
    > functions but not in general.
    >
    > Choosing python has advantages and disadvantages.


    It is my understanding that Python is largely self-documenting. It has
    dir(), globals(), locals() etc. Why couldn't the editor compile and
    execute the source code in sandbox on the fly? It would then know the
    object types in most cases. By "in sandbox" I mean that it should not
    execute any operating system functions (file, network etc) but it should
    create the objects still.

    Visual Basic has a very good intellisense. But it only works if you
    define the data types explicitly. Python should have an option to define
    the data type for variables... and "option explicit", which should be
    simple to implement.

    Harri
    Harri Pesonen, Oct 3, 2003
    #12
  13. > It is my understanding that Python is largely self-documenting. It has
    > dir(), globals(), locals() etc. Why couldn't the editor compile and
    > execute the source code in sandbox on the fly? It would then know the
    > object types in most cases. By "in sandbox" I mean that it should not
    > execute any operating system functions (file, network etc) but it should
    > create the objects still.


    This is a very bad idea. There is nothing like a sandbox that gives
    you a reliable test evaluation. Code depends on the order you run the
    modules, etc.
    Sit back and really think about it - if you still believe your idea is
    useable get a python book and learn more about the language.

    One theoretical idea is to track the types used in former program
    runs. But this is in general an O(exp) problem, so nobody is doing
    this.

    > Visual Basic has a very good intellisense. But it only works if you
    > define the data types explicitly. Python should have an option to define
    > the data type for variables... and "option explicit", which should be
    > simple to implement.


    This is what Wing IDE is doing.
    Lothar Scholz, Oct 4, 2003
    #13
  14. jean.kasapyan

    SM Guest

    Hello,
    I'm the developper of spe (thanks brian for bringing this thread under
    my attention). Let me reply...


    Harri Pesonen <> wrote in message news:<zj0fb.251$>...
    > Bryan wrote:
    > > Harri Pesonen wrote:
    > >> Jussi Jumppanen wrote:
    > >>> jean.kasapyan wrote:
    > >>>
    > >>>> I search Python IDE with Code Intellisense

    > > would you consider SPE as having intellisense?
    > > http://spe.pycs.net/
    > >
    > > i've been using this editor for about a week now and i'm very impressed.

    >
    > It is much better, but seems to be a bit buggy. The first thing I tried is
    >
    > re.
    >
    > which opens a list of re attributes, fine, but when I hit "c" for
    > "compile", the list just closes.

    This bug is strange and shouldn't happen. When I have time I'll have a
    look at it.

    > When I write
    >
    > string.
    >
    > the list opens and when I press "c" the list scrolls to "capitalize" as
    > expected. Also when I complete it and press (, it shows the doc string,
    > great.
    >
    > Still it does not understand that "asdf" is a string so
    >
    > "asdf".
    >
    > should show string methods. Also if I write
    >
    > reo = re.compile(r"#define\s+Py_None.*\n")
    >
    > it should know that reo is a regular expression object. It should try at
    > least. :)

    This is very hard to implement because it means evaluating a program
    on the fly, which is problematic especially for time consuming code.
    So the problem is bigger than just a sandbox issue. However in spe
    there is a (minor) workaround: if you type the code "reo=..." in the
    shell it will treat reo as well in the editor window as a regular
    expression.

    > Simpler example:
    >
    > string.upper().
    >
    > and it shows nothing.

    For me this works however.

    > There are some real problems as well, the Shell window does not paint
    > correctly always.

    The shell window is a pycrust plugin, on which I'm not coding.

    > Overall, buggy but promising.

    Patches are always welcome ;-) I always try to fix any bug which is
    not part of external plugins (as PyCrust, kiki, wxGlade,...) External
    bugs should be filed to the specific authors.

    A few words about spe's autocompletion. It takes the word left from a
    "." (all characters, including _ and .), than it tries to evaluate
    that object and uses the dir function to form the list. Of course
    there should be better solutions. I'm not working on this issue at the
    moment, other things have my priority now. But spe is often extended
    by user contributions, so if someone can write a good autocompletion
    code I'll be happy to implement it. The auto-completion code of spe is
    located in the file sm/wxPyEdit.py in the char event for '.' It's easy
    to study this code and to improve it. So any volunteers?

    Stani
    SM, Oct 7, 2003
    #14
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    903
    Axel Straschil
    Apr 6, 2005
  2. Ilias Lazaridis
    Replies:
    6
    Views:
    454
    Ilias Lazaridis
    Jan 28, 2006
  3. Ilias Lazaridis
    Replies:
    13
    Views:
    225
    Ilias Lazaridis
    Apr 12, 2005
  4. Ilias Lazaridis
    Replies:
    0
    Views:
    107
    Ilias Lazaridis
    Jan 26, 2006
  5. Ilias Lazaridis
    Replies:
    8
    Views:
    134
    Ilias Lazaridis
    Jan 28, 2006
Loading...

Share This Page