Hi, I have just started to use PythonCard. Just thought you may want to know about a bug/problem I may have found. My python path is c:\program files\python22 and when I tried to run scripts from the editors (eg CodeEditor) they would not work, because there was a space in the path. In the runScript function of the editor files, if I change os.spawnv(os.P_NOWAIT, python, [python, '-i', filename] + args) to os.spawnv(os.P_NOWAIT, python, ['"'+python+'"', '-i', filename] + args) the scripts run (eg line 1017 in CodeEditor.py) Let me know if there is a better way to fix this. Cheers Michael Sorich --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.408 / Virus Database: 230 - Release Date: 24/10/2002
Which version of Windows are you using? I thought we solved this problem, but I guess I dropped the ball. You'll have similar issues with findfiles, the samples launcher, and the resourceEditor. ka > -----Original Message----- > From: pyt...@li... > [mailto:pyt...@li...]On Behalf Of > Michael Sorich > Sent: Thursday, November 07, 2002 3:32 PM > To: pyt...@li... > Subject: [Pythoncard-users] run script path problem > > > Hi, > > I have just started to use PythonCard. Just thought you may want to know > about a bug/problem I may have found. > > My python path is c:\program files\python22 and when I tried to run > scripts from the editors (eg CodeEditor) they would not work, because > there was a space in the path. > > In the runScript function of the editor files, if I change > os.spawnv(os.P_NOWAIT, python, [python, '-i', filename] + args) > to > os.spawnv(os.P_NOWAIT, python, ['"'+python+'"', '-i', filename] + args) > the scripts run (eg line 1017 in CodeEditor.py) > > Let me know if there is a better way to fix this. > > Cheers > > Michael Sorich > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.408 / Virus Database: 230 - Release Date: 24/10/2002 > > > > ------------------------------------------------------- > This sf.net email is sponsored by: See the NEW Palm > Tungsten T handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users >
I am running Windows XP. Findfiles and resourceEditor do not work without adjustment, however samples launcher seems to. Michael -----Original Message----- From: pyt...@li... [mailto:pyt...@li...] On Behalf Of Kevin Altis Sent: Friday, 8 November 2002 11:48 AM To: Michael Sorich; pyt...@li... Subject: RE: [Pythoncard-users] run script path problem Which version of Windows are you using? I thought we solved this problem, but I guess I dropped the ball. You'll have similar issues with findfiles, the samples launcher, and the resourceEditor. ka > -----Original Message----- > From: pyt...@li... > [mailto:pyt...@li...]On Behalf Of > Michael Sorich > Sent: Thursday, November 07, 2002 3:32 PM > To: pyt...@li... > Subject: [Pythoncard-users] run script path problem > > > Hi, > > I have just started to use PythonCard. Just thought you may want to know > about a bug/problem I may have found. > > My python path is c:\program files\python22 and when I tried to run > scripts from the editors (eg CodeEditor) they would not work, because > there was a space in the path. > > In the runScript function of the editor files, if I change > os.spawnv(os.P_NOWAIT, python, [python, '-i', filename] + args) > to > os.spawnv(os.P_NOWAIT, python, ['"'+python+'"', '-i', filename] + args) > the scripts run (eg line 1017 in CodeEditor.py) > > Let me know if there is a better way to fix this. > > Cheers > > Michael Sorich > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.408 / Virus Database: 230 - Release Date: 24/10/2002 > > > > ------------------------------------------------------- > This sf.net email is sponsored by: See the NEW Palm > Tungsten T handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > ------------------------------------------------------- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en _______________________________________________ Pythoncard-users mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/pythoncard-users --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.408 / Virus Database: 230 - Release Date: 24/10/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.408 / Virus Database: 230 - Release Date: 24/10/2002
"Michael Sorich" <mik...@ho...> writes: > Hi, > > I have just started to use PythonCard. Just thought you may want to know > about a bug/problem I may have found. > > My python path is c:\program files\python22 and when I tried to run > scripts from the editors (eg CodeEditor) they would not work, because > there was a space in the path. > > In the runScript function of the editor files, if I change > os.spawnv(os.P_NOWAIT, python, [python, '-i', filename] + args) > to > os.spawnv(os.P_NOWAIT, python, ['"'+python+'"', '-i', filename] + args) > the scripts run (eg line 1017 in CodeEditor.py) > > Let me know if there is a better way to fix this. IIRC, we once had the same problem in distutils running external programs. The solution, which seems to work, is to enclose the program pathname in double quotes *only* when it contains spaces. Something like if ' ' in python: os.spawnv(os.P_NOWAIT, python, ['"'+python+'"', '-i', filename] + args) else os.spawnv(os.P_NOWAIT, python, [python, '-i', filename] + args) should probably work. Thomas