[wxPython-users] pydoc -p 8020 Bugs?
Robin Dunn
robin at alldunn.com
Wed Mar 21 12:19:29 PDT 2007
umetyan wrote:
> Hi.
>
> i type pydoc -p 8020. and
> i access to http://localhost:8020/wx.html , and so next error code. Access
> Deny.
>
> ----------------------------------------
> Exception happened during processing of request from ('127.0.0.1', 3704)
> Traceback (most recent call last):
> File "C:\Python25\lib\SocketServer.py", line 222, in handle_request
> self.process_request(request, client_address)
> File "C:\Python25\lib\SocketServer.py", line 241, in process_request
> self.finish_request(request, client_address)
> File "C:\Python25\lib\SocketServer.py", line 254, in finish_request
> self.RequestHandlerClass(request, client_address, self)
> File "C:\Python25\lib\SocketServer.py", line 521, in __init__
> self.handle()
> File "C:\Python25\lib\BaseHTTPServer.py", line 316, in handle
> self.handle_one_request()
> File "C:\Python25\lib\BaseHTTPServer.py", line 310, in handle_one_request
> method()
> File "C:\Python25\Lib\pydoc.py", line 1920, in do_GET
> self.send_document(describe(obj), html.document(obj, path))
> 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 687, in docmodule
> contents.append(self.document(value, key))
> File "C:\Python25\Lib\pydoc.py", line 330, in document
> return self.docother(*args)
> File "C:\Python25\Lib\pydoc.py", line 918, in docother
> return lhs + self.repr(object)
> File "C:\Python25\Lib\pydoc.py", line 381, in repr
> return Repr.repr(self, object)
> File "C:\Python25\lib\repr.py", line 24, in repr
> return self.repr1(x, self.maxlevel)
> File "C:\Python25\Lib\pydoc.py", line 388, in repr1
> return self.escape(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 *'
This happens because pydoc is trying to evaluate objects that haven't
been initialized yet (because there is no wx.App object.) You can get
the same thing from a plain interpreter:
$ python
Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> repr(wx.RED)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"/usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_gdi.py", line
242, in __repr__
def __repr__(self): return 'wx.Colour' +
str(self.Get(True))
File
"/usr/lib/python2.4/site-packages/wx-2.8-gtk2-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 *'
>>>
>>> app = wx.App()
>>> repr(wx.RED)
'wx.Colour(255, 0, 0, 255)'
>>>
>
> ----------------------------------------
>
> And i access to
> http://localhost:8020/wxPython.html
> Warning output, but Access OK.
>
> C:\Python25\Lib\pydoc.py:289: DeprecationWarning: The wxPython compatibility
> pac
> kage is no longer automatically generated or activly maintained. Please switch
> to the wx package as soon as possible.
> module = __import__(path)
> ----------------------------------------
This is exactly what it says it is, a warning that the wxPython package
dir is no longer maintained and is deprecated.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list