The samples launcher (samples.py) seems to be working fine on Windows, but I
can't test it on Unix, so I don't know if the os.spawnv code below is
correct. If someone in Unix land can confirm that it works or provide a
better solution that would be great.
samples.py, samples.rsrc.py, and the readme.txt are at:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/pythoncard/PythonCardPrototyp
e/samples/
def on_btnLaunch_mouseClick(self, menu, event):
name = self.components.listSamples.selected
path = name
name = name + '.py'
args = self.getCommandLineArgs()
if sys.platform[:3]=='win':
# this only works on Windows
os.popen('start ' + os.path.join(path, name) + args)
else:
args = ['python', os.path.join(path, name)] + args.split()
os.spawnv(os.P_DETACH, 'python', args)
Once this issue is solved, I'll go ahead and do a 0.4.4.1 release that
contains the samples launcher.
ka
|