#30 Extension to CallTips / Show attributes


This is a new version of an extension to CallTips
showing on the fly attributes and methods of an object.

This proposal is based on IDLEfork 0.9a1 (and Python
2.2) .

Three files have to be modified :
CallTipWindow.py and

New features:

Hitting a dot will display all available attributes and
methods of an object within a scrollable box. (apart from
names beginning with __ )

Key-Up and Key-Down events support scrolling.

Further Key event will reduce the proposed names
according to the substring written to the text widget.

Hitting the Space-Key will copy the topmost item of the
list to the Editor or Console window.

... A usefull extension for python beginners !

Martin Liebmann

Attached (as zip archive):


  • Kurt B. Kaiser

    Kurt B. Kaiser - 2003-01-12

    Logged In: YES

    Will you be able to upload the patch file?

    BTW, we prefer context diffs over unidiffs when possible.

  • Martin Liebmann

    Martin Liebmann - 2003-01-13

    zipped tar archive of 3 context diffs

  • Kurt B. Kaiser

    Kurt B. Kaiser - 2003-01-14
    • assigned_to: nobody --> kbk
    • status: open --> open-duplicate
  • Kurt B. Kaiser

    Kurt B. Kaiser - 2003-01-14
    • status: open-duplicate --> open-accepted
  • Kurt B. Kaiser

    Kurt B. Kaiser - 2003-01-20
    • status: open-accepted --> open-postponed
  • Kurt B. Kaiser

    Kurt B. Kaiser - 2003-01-20

    Logged In: YES

    I think this patch could use some addtional work before
    it's really ready for prime time:

    import StringIO

    StringIO.StringIO. [produces a list of class StringIO
    attributes. Useful, but
    to be produced at the class

    >>> s = StringIO.StringIO
    >>> s
    <class StringIO.StringIO at 0x402df3bc>

    >>> s. [doesn't produce a list of
    attributes, as would be expected
    for the instance.]

    >>> ================================ RESTART =========
    >>> from StringIO import *
    >>> StringIO
    <class StringIO.StringIO at 0x402df3bc>
    >>> StringIO. [produces the list of classes and
    top level defs associated with the
    StringIO module]

    >>> ================================ RESTART =========
    >>> class Animal:
    def __init__(self, numberlegs, sound=None):
    self.nlegs = numberlegs
    self.sound = sound

    def legs(self, numberlegs=None):
    if numberlegs == None:
    print self.nlegs
    self.nlegs = numberlegs

    def sound(self):
    print sound

    >>> dog = Animal. [doesn't produce a list of
    >>> dog = Animal( [produces the expected call tip]
    >>> dog = Animal(4, 'bark')
    >>> dog
    <__main__.Animal instance at 0x404dd42c>
    >>> dog. [doesn't produce a list of
    attributes. Generally can't
    see attributes for Classes
    defined in shell for some reason.]

    [define Animal in efoo.py]
    >>> ================================ RESTART ========
    >>> import efoo
    >>> efoo. [produces a list of efoo.py Classes
    and top-level defs]
    >>> efoo.Animal. [produces list of Animal attributes]
    >>> dog = efoo.Animal(4, 'bark')
    >>> dog
    <efoo.Animal instance at 0x405489ac>
    >>> dog. [doesn't produce list of attributes.]

  • Martin Liebmann

    Martin Liebmann - 2003-01-26

    Logged In: YES

    The new patches will patch the problems reported by kbk

  • Kurt B. Kaiser

    Kurt B. Kaiser - 2003-01-27
    • status: open-postponed --> open-accepted
  • Kurt B. Kaiser

    Kurt B. Kaiser - 2003-01-27

    Logged In: YES

    Remove duplicate uploads.

    Thanks for the updates!


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks