[Tutor] Fw: 2) 'WHICH MULTI'

Terry Carroll carroll at tjc.com
Mon Apr 2 19:21:58 CEST 2007

On Fri, 30 Mar 2007, ALAN GAULD wrote:

> One of my tutorial users has come upon a really weird bug.
> He has sent a transcript oif his session. Notice that wx 
> is not defined yet doing help(wx) produces a strange message.

Very weird.  Here's what I get, weird in a different way...

ActivePython (ActiveState Software Inc.) based on
Python 2.5 (r25:51908, Mar  9 2007, 17:40:28) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print wx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'wx' is not defined
>>> dir(wx)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'wx' is not defined
>>> help
Type help() for interactive help, or help(object) for help about object.
>>> help()

Welcome to Python 2.5!  This is the online help utility.

help> wx
[pause of about 6 seconds]

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python25\lib\site.py", line 355, in __call__
    return pydoc.help(*args, **kwds)
  File "C:\Python25\Lib\pydoc.py", line 1649, in __call__
  File "C:\Python25\Lib\pydoc.py", line 1667, in interact
  File "C:\Python25\Lib\pydoc.py", line 1688, in help
    elif request: doc(request, 'Help on %s:')
  File "C:\Python25\Lib\pydoc.py", line 1481, in doc
    pager(title % desc + '\n\n' + text.document(object, name))
  File "C:\Python25\Lib\pydoc.py", line 324, in document
    if inspect.ismodule(object): return self.docmodule(*args)
  File "C:\Python25\Lib\pydoc.py", line 1084, in docmodule
    contents.append(self.docother(value, key, name, maxlen=70))
  File "C:\Python25\Lib\pydoc.py", line 1283, in docother
    repr = self.repr(object)
  File "C:\Python25\Lib\repr.py", line 24, in repr
    return self.repr1(x, self.maxlevel)
  File "C:\Python25\Lib\pydoc.py", line 951, in repr1
    return cram(stripid(repr(x)), self.maxother)
  File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py", line 242, in __repr__
    def __repr__(self):                 return 'wx.Colour' + str(self.Get(True))

  File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py", line 230, in Get
    return _gdi_.Colour_Get(*args, **kwargs)
TypeError: in method 'Colour_Get', expected argument 1 of type 'wxColour *'

More information about the Tutor mailing list