Re: drop down feature

Discussion in 'Python' started by Greg Brunet, Aug 12, 2003.

  1. Greg Brunet

    Greg Brunet Guest

    Somewhat, depending on the IDE you choose, but not really. Search the
    newsgroup (or use google) to find a thread titled "'Intellisense'
    possible for Python?" started (by me) on Dec 18, 2002. It discusses why
    this isn't really possible with Python (short version: dynamic typing
    doesn't allow them to do this). Generally, the interactive
    interepreter windows support this better than the editors. Pat O'Brien
    did some work on improving this in the PyAlaCarte series of editors, but
    I've not been able to get it working completely, and he seems to not be
    doing any additional work on it at this time. As someone who also came
    from VB, support for intellisense-type capabilities would be the largest
    practical improvement that could be made to ease-of-use & adoption of
    Python. I think that it's hard for those folks who haven't benefited
    from it to understand how nice it really is. Good luck,

    --
    Greg

    "Emmanuel Jean-Louis" <> wrote in message
    news:...

    Does python 2.2 has a drop down feature like VB does so that you can
    list of methods and variables associate with that particular class? If
    it does, how do I turn it on?

    Thx.
    Greg Brunet, Aug 12, 2003
    #1
    1. Advertising

  2. IDLE can help with its Class Browser feature. Although this not "automatic",
    it will help a lot
    when using site-packages or even your own old code ;-)

    For the beginner, of course even properties (attributes and methodes) of
    standard types are not
    obvious. I must say, that Python can really be a little bit cryptical
    (consider *get* oder *has_key* for
    directories ). I generally have to look it up, when *haskey* or *has* does
    not work ;-)

    But you can very well organize yourself with man pages....

    The main problem seems to be that Python has no static typing. So it
    *generally* is not possible
    for an editor to know what type will dynamically be used.

    Though in most cases - especially with callable objects - there can be a
    good guess.

    Nevertheless I also think that the problem is not so much, that there can be
    no solution
    but - as you said - not everyone is aware of the benefits of those
    feature....

    Problems increase especially with GUIs - I would be lost even in Tkinter
    without a paper reference ;-)

    Kindly
    Michael Peuser


    "Greg Brunet" <> schrieb im Newsbeitrag
    news:...
    > Somewhat, depending on the IDE you choose, but not really. Search the
    > newsgroup (or use google) to find a thread titled "'Intellisense'
    > possible for Python?" started (by me) on Dec 18, 2002. It discusses why
    > this isn't really possible with Python (short version: dynamic typing
    > doesn't allow them to do this). Generally, the interactive
    > interepreter windows support this better than the editors. Pat O'Brien
    > did some work on improving this in the PyAlaCarte series of editors, but
    > I've not been able to get it working completely, and he seems to not be
    > doing any additional work on it at this time. As someone who also came
    > from VB, support for intellisense-type capabilities would be the largest
    > practical improvement that could be made to ease-of-use & adoption of
    > Python. I think that it's hard for those folks who haven't benefited
    > from it to understand how nice it really is. Good luck,
    >
    > --
    > Greg
    >
    > "Emmanuel Jean-Louis" <> wrote in message
    > news:...
    >
    > Does python 2.2 has a drop down feature like VB does so that you can
    > list of methods and variables associate with that particular class? If
    > it does, how do I turn it on?
    >
    > Thx.
    >
    Michael Peuser, Aug 12, 2003
    #2
    1. Advertising

  3. Greg Brunet

    Greg Brunet Guest

    Hi Michael:

    "Michael Peuser" <> wrote in message
    news:bhbp0k$epd$07$-online.com...
    > IDLE can help with its Class Browser feature. Although this not

    "automatic",
    > it will help a lot
    > when using site-packages or even your own old code ;-)


    IDLE and many other GUI's do provide that & it is a definite help. Any
    class library, whether Python's or some other language, simply has to be
    learned. Hopefully, the designers were consistent and 'standard' in
    their name choices to make things easier, and certainly once you begin
    using a tool frequently it becomes easier. Even as good as a class
    browser is, I've found that the Intellisense stuff is perhaps an order
    of magnitude more helpful to me than the browser. Without having to
    manually jump to another window/pane & lookup the class I'm interested
    in, I have all of the properties & methods available as I finish typing
    the variable, AND a link to the full help on the item by pressing F1 as
    soon as I've selected it.

    > For the beginner, of course even properties (attributes and methods)

    of
    > standard types are not
    > obvious. I must say, that Python can really be a little bit cryptical
    > (consider *get* oder *has_key* for
    > directories ). I generally have to look it up, when *haskey* or *has*

    does
    > not work ;-)
    >
    > But you can very well organize yourself with man pages....
    >
    > The main problem seems to be that Python has no static typing. So it
    > *generally* is not possible
    > for an editor to know what type will dynamically be used.


    And this is where, as disparagingly as people talk of VB, it does a good
    job. Because it highly encourages (though can disable) static typing &
    checking, it is able to know what the properties, methods, etc. are for
    a variable. In reading a description of the WingIDE for Python, their
    standard package tries to accomplish this by: "Infers class structure
    and variable types based on real time analysis of Python source code."
    I understand that Python for now & likely evermore will be dynamically
    typed - hopefully the editors can get smarter about performing this
    analysis to support the intellisense type operation.

    > Problems increase especially with GUIs - I would be lost even in

    Tkinter
    > without a paper reference ;-)


    Also agreed. And one other thing that I've never seen matched (even the
    1.0 version of .NET wasn't as good) is the dynamic debugger in VB6.
    When I've tried to debug code in IDLE or PythonWin or Boa, I frequently
    end up at layers deeper in the class hierarchy than I wish to go (I
    usually want to break at my code, but end up in some of the debugger
    support code & have to navigate my way up/over to do anything). Also
    the VB debugger would provide mouse-over information of any variables
    (their value, etc.) displayed in the editor at the time the breakpoint
    fires, along with an unbelievable ability to edit and continue running
    the program. If someone could come up with an editor for Python with
    the capabilities of the VB6 IDE, I'd certainly pay for that one. For
    now, it seems that Boa is the closest thing to the mark in the open
    source field. I've not evaluated the commercial editors sufficiently,
    but from what I've read, there isn't anything out there yet that meets
    that criteria.

    > Kindly
    > Michael Peuser


    Take care,

    --
    Greg
    Greg Brunet, Aug 13, 2003
    #3
  4. Greg Brunet

    John J. Lee Guest

    "Greg Brunet" <> writes:
    [...]
    > And this is where, as disparagingly as people talk of VB, it does a good
    > job. Because it highly encourages (though can disable) static typing &
    > checking, it is able to know what the properties, methods, etc. are for
    > a variable.


    Certainly true.

    Remember, though:

    >>> import sets
    >>> s = sets.Set()
    >>> dir(s)

    ['__and__', '__as_immutable__', '__as_temporarily_immutable__',
    '__class__', '__cmp__', '__contains__', '__copy__', '__deepcopy__',
    '__delattr__', '__doc__', '__eq__', '__ge__', '__getattribute__',
    '__getstate__', '__gt__', '__hash__', '__iand__', '__init__',
    '__ior__', '__isub__', '__iter__', '__ixor__', '__le__', '__len__',
    '__lt__', '__module__', '__ne__', '__new__', '__or__', '__reduce__',
    '__reduce_ex__', '__repr__', '__setattr__', '__setstate__',
    '__slots__', '__str__', '__sub__', '__xor__', '_binary_sanity_check',
    '_compute_hash', '_data', '_repr', '_update', 'add', 'clear', 'copy',
    'difference', 'difference_update', 'discard', 'intersection',
    'intersection_update', 'issubset', 'issuperset', 'pop', 'remove',
    'symmetric_difference', 'symmetric_difference_update', 'union',
    'union_update', 'update']
    >>> help(zip)


    etc.


    > Also agreed. And one other thing that I've never seen matched (even the
    > 1.0 version of .NET wasn't as good) is the dynamic debugger in VB6.
    > When I've tried to debug code in IDLE or PythonWin or Boa, I frequently
    > end up at layers deeper in the class hierarchy than I wish to go (I
    > usually want to break at my code, but end up in some of the debugger
    > support code & have to navigate my way up/over to do anything). Also


    If it doesn't annoy too many people (even if it does, actually), I'm
    tempted to say 'Don't do that'. Write unit tests (before the code, of
    course), think harder rather than debug harder, and use print
    statements instead. Not that I don't fall into the same traps myself,
    of course (and yes, debuggers can sometimes be useful)...

    Mind you, maybe this *is* partly sour grapes from me -- I've never
    really used a debugger / IDE like the one you describe, and as you
    say, editor (rather than interpreter) auto-completion is at least very
    hard to implement for Python.


    John
    John J. Lee, Aug 13, 2003
    #4
  5. Greg Brunet

    John J. Lee Guest

    "Michael Peuser" <> writes:

    > I fully agree with your very comprehensive statements. I personally do not
    > know VB so much but RealBasic for Macintosh which is absolutely in the line
    > of useability. It is as well a very friendly GUI Builder with all
    > drag-n-drop and multimedia stuff AND it compiles AND it makes self contained
    > exe files!!
    >
    > This in fact is my wishlist for a Python IDE .....
    > Of course the *language* itself is mess ;-)

    [...]

    Never bought the often-tacit assumption that programming environments
    that happen not to be entirely graphical, and that aren't run by
    clicking on a single .exe are somehow not integrated (in some ways
    they tend to be less well integrated, in others more), so:

    GUI builder:
    wxPython / BOA constructor
    OR PyQt / Qt designer
    OR VB (implement COM servers in Python, write GUI in VB)

    exe builder:
    py2exe
    OR McMillan Installer

    "drag-n-drop and multimedia stuff"
    Not sure what that means!


    John
    John J. Lee, Aug 13, 2003
    #5
  6. "John J. Lee" <> schrieb im Newsbeitrag
    news:...
    > "Michael Peuser" <> writes:
    >
    > > I fully agree with your very comprehensive statements. I personally do

    not
    > > know VB so much but RealBasic for Macintosh which is absolutely in the

    line
    > > of useability. It is as well a very friendly GUI Builder with all
    > > drag-n-drop and multimedia stuff AND it compiles AND it makes self

    contained
    > > exe files!!
    > >
    > > This in fact is my wishlist for a Python IDE .....
    > > Of course the *language* itself is a mess ;-)


    Well it might not have been clear *which* language I was refering to ;-)
    .........
    > Never bought the often-tacit assumption that programming environments
    > that happen not to be entirely graphical, and that aren't run by
    > clicking on a single .exe are somehow not integrated (in some ways
    > they tend to be less well integrated, in others more), so:
    >
    > GUI builder:
    > wxPython / BOA constructor
    > OR PyQt / Qt designer
    > OR VB (implement COM servers in Python, write GUI in VB)
    >
    > exe builder:
    > py2exe
    > OR McMillan Installer



    Yes, yes, yes! But when you are new to a language like Python, it is VERY
    DIFFICULT for you to find out, WHICH tool to use and WHICH library to
    download. Especially if they are not free as some of the better products you
    mention above. The choice between Tkinter, Qt and wx (and there is still FOX
    and something like FLTK and a lot of experimental projects like WCK, DynWin
    and PyUI...)

    There is a real great advantage of a comfortable - icluded! - IDE. This is
    the main reason I stay to IDLE and Tkinter, though they have none of the
    features I should like to have.


    >
    > "drag-n-drop and multimedia stuff"
    > Not sure what that means!


    A modern GUI is expected to support OS wide Drag and Drop. E.g. an IDE
    should be able to accept a source file dropped to it. Alas there is nothing
    like the integrated Quicktime-Technology on other platforms. For the simple
    programmer Quicktime has made most of any thougths about image audio or CD
    formats obsolete.

    Strictly both features have nothing to do with the discussion. They came to
    my mind when thinking back to all the good things of RealBasic....
    >
    >
    > John


    Kindly
    Michael
    Michael Peuser, Aug 13, 2003
    #6
    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. SirPoonga
    Replies:
    2
    Views:
    728
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    989
    weiwei
    Jan 5, 2007
  3. msimmons
    Replies:
    0
    Views:
    440
    msimmons
    Jul 16, 2009
  4. Replies:
    5
    Views:
    233
  5. Replies:
    3
    Views:
    267
Loading...

Share This Page