Before I spend alot of time trying to figure out what's wrong I wanted
to ask...Is it a requirement to have X installed and/or running to import
wxPython.wx?
You do have to have $DISPLAY set, and be able to connect to the X display
specified therein.
On a server box with no X and wxPythonGTK-py2.2-2.4.0.1-1
Well, you presumably have the necessary X *libraries* installed....
You don't need to have an X server running on the same machine, but
you do need to have one running -somewhere- for wx to connect-to.
At the interactive prompt I type:
>>import wxPython.wxand python crashes and has this to say:
>Gtk-WARNING **: cannot open display:Any .py file similarly dies.
Yep, that's what happens.
btw, one reason to run wx without X is that the server is cvs/build box
and runs pychecker, setup.py, epydoc and others that import files that
import wxPython.wx. But, it never actually runs them.
Been there....
I had pydoc running as a web-server, a while back, so that I could
keep a `more-than-up-to-date' reference for my libraries on my
web-site--so that people could get a general idea of what I was
working-on.
Well, one of my libraries used wxPython, so, when someone tried to
fetch the doc-page for it, my module loaded, imported wxPython...; wx
failed to connect to $DISPLAY and killed my server....
My solution was to run the pydoc-server in a loop, so that it'd
respawn when it died, but that's not an option if you really want it
to be able to do something useful for you wxPython-using modules....
Maybe you could just make wx happy by pointing $DISPLAY to an Xvfb process?
···
On Mon, Jan 20, 2003 at 08:06:29PM -0800, Norman J. Harman Jr. wrote:
--
"... I believe that learnability is a laudable goal, but frequently
misplaced. The purpose of a language is not to help you learn the
language, but to help you learn *other* things by using the language."
--Larry Wall