Package: python-wxgtk2.8
Version: 2.8.12.1-12
Severity: minor
Hello.
Img2py should not require an xserver. For example, it should be
available in a pdebuild chroot.
You may reproduce the failure with
# touch src.png
# unset DISPLAY
# python /usr/share/pyshared/wx-2.8-gtk2-unicode/wx/tools/img2py.py src.png
dest.py
Instead of creating dest.py, the interpreter aborts with the message
"Unable to access the X Display, is $DISPLAY set properly?"
The attached trivial patch seems to solve the problem.
Versions of packages python-wxgtk2.8 depends on:
ii python 2.7.3~rc2-1
ii python-wxversion 2.8.12.1-12
--- /usr/share/pyshared/wx-2.8-gtk2-unicode/wx/tools/img2py.py 2010-04-15 06:26:37.000000000 +0200
+++ img2py.py 2013-01-15 03:39:32.000000000 +0100
@@ -95,7 +95,6 @@
except AttributeError:
b64encode = base64.encodestring
-app = None
DEFAULT_APPEND = False
DEFAULT_COMPRESSED = True
DEFAULT_MASKCLR = None
@@ -145,10 +144,6 @@
if functionCompatibile != -1:
functionCompatible = functionCompatibile
- global app
- if not wx.GetApp():
- app = wx.PySimpleApp()
-
# convert the image file to a temporary file
tfname = tempfile.mktemp()
try: