I am trying to program a console application on Linux that uses pieces of wxPython (specifically wxBitmap and wxImage). Basically, I have wxBitmap objects living on a Windows box, and I have a network service that can scrape the data from the wxBitmap object, send it to the linux box, where I reconsititute it as a file and place it on a web page.
(Imagine a live food Menu with images of the items we sell...we want any changes to the menu to be propagated instantly to the website from our Point of Sale system).
The code I use works gloriously on a Windows box. I create an wx.App object (that I then ignore) and use the wxBitmap/wxImage classes without hassle.
However, when moving this code over to Linux, it seems that there is some dependency within the wx.App object that REQUIRES it be run from an instance of X.
Like this...
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> app=wx.App(False)
Unable to access the X Display, is $DISPLAY set properly?
I need to be able to use the wxBitmap/wxImage objects either without instantiating a wx.App object or to be able to instantiate a wx.App object without triggering the dependency on X.
Note that I pass in False to wx.App, which means I don't want anything redirected to a window. This SHOULD work. But it doesn't.
Any wisdom from anyone on how to make a NON-X depedent wxPython app?
Christopher L. Spencer