wxPython 2.8 Win32 Installation Question

I apologize if this is the wrong place for this (newb) question!

At the python prompt, "help()" followed by "modules" did provide a list of
available modules until I installed wxPython (using the Win32 binary). Here
is a transcript of what is currently happening:

*******************************************************TRANSCRIPT:

help()

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

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://www.python.org/doc/tut/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules. To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics". Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".

modules

Please wait a moment while I gather a list of all available modules...

Warning (from warnings module):
  File "C:\Python25\lib\site-packages\wxaddons\__init__.py", line 180
    return builtin_import(name, globals, locals, fromlist)
DeprecationWarning: The wxPython compatibility package is no longer
automatically generated or actively maintained. Please switch to the wx
package as soon as possible.

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    help()
  File "C:\Python25\lib\site.py", line 346, in __call__
    return pydoc.help(*args, **kwds)
  File "C:\Python25\lib\pydoc.py", line 1648, in __call__
    self.interact()
  File "C:\Python25\lib\pydoc.py", line 1666, in interact
    self.help(request)
  File "C:\Python25\lib\pydoc.py", line 1682, in help
    elif request == 'modules': self.listmodules()
  File "C:\Python25\lib\pydoc.py", line 1803, in listmodules
    ModuleScanner().run(callback)
  File "C:\Python25\lib\pydoc.py", line 1854, in run
    for importer, modname, ispkg in pkgutil.walk_packages():
  File "C:\Python25\lib\pkgutil.py", line 110, in walk_packages
    __import__(name)
  File "C:\Python25\lib\site-packages\wxaddons\__init__.py", line 180, in
import_hook
    return builtin_import(name, globals, locals, fromlist)
  File
"C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wxPython\__init__.py",
line 15, in <module>
    import _wx
  File "C:\Python25\lib\site-packages\wxaddons\__init__.py", line 180, in
import_hook
    return builtin_import(name, globals, locals, fromlist)
  File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wxPython\_wx.py",
line 8, in <module>
    from _misc import *
  File "C:\Python25\lib\site-packages\wxaddons\__init__.py", line 180, in
import_hook
    return builtin_import(name, globals, locals, fromlist)
  File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wxPython\_misc.py",
line 456, in <module>
    wxDateTime_GetNumberOfDaysinYear =
wx._misc.DateTime_GetNumberOfDaysinYear
AttributeError: 'module' object has no attribute
'DateTime_GetNumberOfDaysinYear'

*******************************************************END TRANSCRIPT

I know there are other ways to get module help, but I would like this to
work consistently when I have to teach it to first year students. What do I
need to change to get help() to work properly when wxPython is installed?

Thanks!!

Thanks Robin,

Removing the wxPython folder allowed help - modules to still work. I get a
help screen for wxversion and wxaddons no problem. But when I try to get
help for wx alone, I see:

wx

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    help()
  File "C:\Python25\lib\site.py", line 346, in __call__
    return pydoc.help(*args, **kwds)
  File "C:\Python25\lib\pydoc.py", line 1648, in __call__
    self.interact()
  File "C:\Python25\lib\pydoc.py", line 1666, in interact
    self.help(request)
  File "C:\Python25\lib\pydoc.py", line 1687, 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 *'

I can live with this, however, so it is not really a problem.

I'm teaching Python to a first year computing course this year, which has
been taught for many years until now in Java. This should be interesting!!

Alan McLeod

ยทยทยท

-----Original Message-----
From: wxpython-users-bounces+mcleod=cs.queensu.ca@lists.wxwidgets.org
[mailto:wxpython-users-bounces+mcleod=cs.queensu.ca@lists.wxwidgets.org] On
Behalf Of Robin Dunn
Sent: May 24, 2008 6:26 PM
To: wxpython-users@lists.wxwidgets.org
Subject: Re: [wxpython-users] wxPython 2.8 Win32 Installation Question

Alan McLeod wrote:

I apologize if this is the wrong place for this (newb) question!

At the python prompt, "help()" followed by "modules" did provide a
list of available modules until I installed wxPython (using the Win32
binary). Here is a transcript of what is currently happening:

  File
"C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wxPython\_misc.py",
line 456, in <module>
    wxDateTime_GetNumberOfDaysinYear =
wx._misc.DateTime_GetNumberOfDaysinYear
AttributeError: 'module' object has no attribute
'DateTime_GetNumberOfDaysinYear'

*******************************************************END TRANSCRIPT

I know there are other ways to get module help, but I would like this
to work consistently when I have to teach it to first year students.
What do I need to change to get help() to work properly when wxPython is

installed?

This is a known problem and has already been fixed. The easiest way to fix
it in your local installation is to just remove the wxPython package since
everyone should only be using the wx package now.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users