Re: [Tutor] os.startfile

2010-12-19 Thread Alan Gauld
"Lang Hurst" wrote I can't install anything at work (XP computer), hence the stand alone file. Then when I run it, everything works fine, except when I get to the point where I want notepad to open the file. I can browse to the file and manually open it with notepad and it's fine. It just

Re: [Tutor] os.startfile

2010-12-19 Thread Lang Hurst
On 12/19/2010 01:16 PM, Steven D'Aprano wrote: Lang Hurst wrote: I have the following in my program: try: os.startfile('current_credit.txt') except: os.system('/usr/bin/xdg-open current_credit.txt') Basically, open a file in notepad if I'm on windows,

Re: [Tutor] os.startfile

2010-12-19 Thread Steven D'Aprano
Lang Hurst wrote: I have the following in my program: try: os.startfile('current_credit.txt') except: os.system('/usr/bin/xdg-open current_credit.txt') Basically, open a file in notepad if I'm on windows, vim if on my home linux computer. It works fin

[Tutor] os.startfile

2010-12-19 Thread Lang Hurst
I have the following in my program: try: os.startfile('current_credit.txt') except: os.system('/usr/bin/xdg-open current_credit.txt') Basically, open a file in notepad if I'm on windows, vim if on my home linux computer. It works fine in linux and in W

Re: [Tutor] os.startfile?

2010-06-24 Thread Alan Gauld
"Jim Byrnes" wrote The os.startfile('socket-nongui.py) line was in a gui program that demonstrates how to start and communicate with a non-gui program. It is Windows specific so I looked for but could not find a drop in replacement that works on Linux. Look at the subprocess module. That

Re: [Tutor] os.startfile?

2010-06-24 Thread Jim Byrnes
Nethirlon wrote: On Thu, Jun 24, 2010 at 7:36 PM, Jim Byrnes wrote: I am trying to run an example program that contains the line os.startfile('socket-nongui.py') which is Windows only. What would be the command to use on Linux? All files are in the same folder. Thanks, Jim _

Re: [Tutor] os.startfile?

2010-06-24 Thread Nethirlon
On Thu, Jun 24, 2010 at 7:36 PM, Jim Byrnes wrote: > I am trying to run an example program that contains the line > os.startfile('socket-nongui.py') which is Windows only.  What would be the > command to use on Linux?  All files are in the same folder. > > Thanks,  Jim > __

[Tutor] os.startfile?

2010-06-24 Thread Jim Byrnes
I am trying to run an example program that contains the line os.startfile('socket-nongui.py') which is Windows only. What would be the command to use on Linux? All files are in the same folder. Thanks, Jim ___ Tutor maillist - Tutor@python.org To