running non-python progs from python

Spiffy spiffy at worldnet.att.net
Wed Dec 10 01:27:07 CET 2003


"Fedor" <fedor at mailandnews.com> wrote in message
news:3fd66012$0$113$3a628fcd at reader2.nntp.hccnet.nl...
>
> "Spiffy" <spiffy at worldnet.att.net> wrote in message
> news:2fsBb.423999$0v4.20388116 at bgtnsc04-news.ops.worldnet.att.net...
> >
> > "Diez B. Roggisch" <deets_noospaam at web.de> wrote in message
> > news:br5hu8$em2$01$1 at news.t-online.com...
> > > > Here is the code used to call it from Python:
> > > > import os
> > > > filename = "C:\Python22\Canyon.mid"
> > > > os.system("C:\Python22\playb.exe%s"%filename)
> > > > ...this causes a dos box to appear which promptly hangs and does
> > nothing,
> > > > at which time Python stops responding. Vartiations on this will
cause
> > the
> > > > dos box to appear with the message "Bad command or file name".
> > > >
> > >
> > > Looks like there is a space missing -
> > >
> > > os.system("C:\Python22\playb.exe %s"%filename)
> > >                                 ^
> > >
> > > Diez
> > >
> >      There is no space missing. That is the name of the file on my comp.
> >
> >
>
> The ^ points right after exe. (use fixed fonts to see). The command you
are
> executing is:
>
> C:\Python22\playb.exeC:\Python22\Canyon.mid
>
> There needs to be a space between exe and the second C:
>
> Hope it helps.
>
>
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).






More information about the Python-list mailing list