Re: running non-python progs from python
"Fedor" <fedor@mailandn ews.com> wrote in message
news:3fd66012$0 $113$3a628fcd@r eader2.nntp.hcc net.nl...[color=blue]
>
> "Spiffy" <spiffy@worldne t.att.net> wrote in message
> news:2fsBb.4239 99$0v4.20388116 @bgtnsc04-news.ops.worldn et.att.net...[color=green]
> >
> > "Diez B. Roggisch" <deets_noospaam @web.de> wrote in message
> > news:br5hu8$em2 $01$1@news.t-online.com...[color=darkred]
> > > > Here is the code used to call it from Python:
> > > > import os
> > > > filename = "C:\Python22\Ca nyon.mid"
> > > > os.system("C:\P ython22\playb.e xe%s"%filename)
> > > > ...this causes a dos box to appear which promptly hangs and does[/color]
> > nothing,[color=darkred]
> > > > at which time Python stops responding. Vartiations on this will[/color][/color][/color]
cause[color=blue][color=green]
> > the[color=darkred]
> > > > dos box to appear with the message "Bad command or file name".
> > > >
> > >
> > > Looks like there is a space missing -
> > >
> > > os.system("C:\P ython22\playb.e xe %s"%filename)
> > > ^
> > >
> > > Diez
> > >[/color]
> > There is no space missing. That is the name of the file on my comp.
> >
> >[/color]
>
> The ^ points right after exe. (use fixed fonts to see). The command you[/color]
are[color=blue]
> executing is:
>
> C:\Python22\pla yb.exeC:\Python 22\Canyon.mid
>
> There needs to be a space between exe and the second C:
>
> Hope it helps.
>
>[/color]
I have tried your suggestion and put a space after the .exe...the result is
the same as before...a dos box appears and does nothing and python crashes
(stops responding).
"Fedor" <fedor@mailandn ews.com> wrote in message
news:3fd66012$0 $113$3a628fcd@r eader2.nntp.hcc net.nl...[color=blue]
>
> "Spiffy" <spiffy@worldne t.att.net> wrote in message
> news:2fsBb.4239 99$0v4.20388116 @bgtnsc04-news.ops.worldn et.att.net...[color=green]
> >
> > "Diez B. Roggisch" <deets_noospaam @web.de> wrote in message
> > news:br5hu8$em2 $01$1@news.t-online.com...[color=darkred]
> > > > Here is the code used to call it from Python:
> > > > import os
> > > > filename = "C:\Python22\Ca nyon.mid"
> > > > os.system("C:\P ython22\playb.e xe%s"%filename)
> > > > ...this causes a dos box to appear which promptly hangs and does[/color]
> > nothing,[color=darkred]
> > > > at which time Python stops responding. Vartiations on this will[/color][/color][/color]
cause[color=blue][color=green]
> > the[color=darkred]
> > > > dos box to appear with the message "Bad command or file name".
> > > >
> > >
> > > Looks like there is a space missing -
> > >
> > > os.system("C:\P ython22\playb.e xe %s"%filename)
> > > ^
> > >
> > > Diez
> > >[/color]
> > There is no space missing. That is the name of the file on my comp.
> >
> >[/color]
>
> The ^ points right after exe. (use fixed fonts to see). The command you[/color]
are[color=blue]
> executing is:
>
> C:\Python22\pla yb.exeC:\Python 22\Canyon.mid
>
> There needs to be a space between exe and the second C:
>
> Hope it helps.
>
>[/color]
I have tried your suggestion and put a space after the .exe...the result is
the same as before...a dos box appears and does nothing and python crashes
(stops responding).
Comment