python call external program (WHAT THE?!)

Jeff jam at quark.emich.edu
Thu Sep 16 16:08:26 EDT 1999


On Thu, Sep 16, 1999 at 12:04:16PM -0600, Mike Steed wrote:
> 
> Just to be nit-picky, forward slashes work fine in argv[0] when passed to
> os.system (at least on WinNT, don't know about Win9x).  So
> os.system('c:/temp/junk.bat') works, but os.system('del c:/temp/*.*') and
> the like will probably fail, depending on the executable.
> 
> Of course, it is safest and most portable to use os.path.
> 
> M.
> 

ok, so the problem is actually in the effort to execute external
(command.com) batch files, instead of implementing them in python directly.
to the original poster: what is in the batch files? can you just make simple
os.system() calls to get the job done? this will eliminate the path problem
entirely.

regards,
J
-- 
|| visit gfd <http://quark.newimage.com/> 
|| psa member #293 <http://www.python.org/> 
|| New Image Systems & Services, Inc. <http://www.newimage.com/>




More information about the Python-list mailing list