announcement
Gerhard Häring
gerhard.haering at gmx.de
Sun Jul 28 17:55:46 EDT 2002
Uwe Schmitt wrote in comp.lang.python:
> Hi,
>
> in order to become acquainted with wxPython I developed a
> programm which facilitates the drawing of resistor nets,
> and is able to compute associatied electrial values.
Very nice! It might also come in useful, as I plan to do a
graph-drawing app in wxPython, too.
One correction for rnetgui.py:
try:
from win32api import RegOpenKeyEx, RegQueryValueEx, error
from win32con import HKEY_LOCAL_MACHINE, KEY_READ
key = RegOpenKeyEx(HKEY_LOCAL_MACHINE,r'SOFTWARE\Ziarc',0,KEY_READ)
homepath=RegQueryValueEx(key,'Path')[0]
#except error:
except Exception, reason:
homepath=os.path.abspath(".")
I replaced the "except error:" line to get it running on Linux.
You might want to do a
try:
from win32api import ...
except ImportError:
# ...
to check wether the win32 extensions are available, which on
non-Windows system, they usually aren't ;-)
Cool work. It also looks polished.
Gerhard
--
mail: gerhard <at> bigfoot <dot> de registered Linux user #64239
web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id AD24C930
public key fingerprint: 3FCC 8700 3012 0A9E B0C9 3667 814B 9CAA AD24 C930
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))
More information about the Python-list
mailing list