[GRASS-dev] WxPython GUIs on Debian/stable?

Markus Neteler neteler at itc.it
Wed Oct 25 09:14:32 EDT 2006


Hamish wrote on 10/25/2006 09:39 AM:
> Jachym Cepicky wrote:
>   
>>> # apt-get install libwxgtk2.4-python   # Version: 2.4.3.1
>>>
>>> G:wxpython > r.shaded.relief --interface-description | ./grassgui.py 
>>> Traceback (most recent call last):
>>>   File "./grassgui.py", line 45, in ?
>>>     import subprocess
>>> ImportError: No module named subprocess
>>> where do I get "subprocess" ?
>>>       
>> subprocess should be part of the python package: 
>>     
>
> $ apt-file search subprocess.py
> python2.4: usr/lib/python2.4/subprocess.py
>
> so it is.
>
> I have python 2.3 installed, which doesn't have it.
>
> and for some reason Debian/Sarge's Wx 2.4 is a python2.3 lib.. ?
>
> libwxgtk2.4-python: /usr/lib/python2.3/site-packages/wxPython/wx.py
>
> maybe just wait for Etch to be released..
>
>   

In my office, I am on RHEL4 with Python 2.3. I think that I solved it
like this

1. cp subprocess.py into
    gui/py_gm/compat/subprocess.py

2. Add to grassgui.py:

try:
        import subprocess
except:
        from compat import subprocess

Something like this may solve the backward compatibility problem.

Markus




More information about the grass-dev mailing list