looking for a better way to call a file.

E

Eric_Dexter

I have been auto-generating .bat files and then running
os.startfile('whatever.bat'). I don't
seem to be having much luck when I try other methods. All of a sudden
I am stuck in a
situation where I need the program that is calling to end and a new
program to start (because otherwise I get several uneeded copies).

csoundgrid4.csgrid(arrg1, """;<sco_header>""", filename)

with this by executing the main function

os3.execvp('python', 'csoundgrid4.py', arrg1, """;<sco_header>""",
filename)

and the program just ends. I would also be glad to get rid of all the
bats that I generate when I
run an external program like csound. The command line I run is
somthing like

csound play.orc play.sco

I haven't had much luck using os.startfile with arguments

Hopefully this is an easy question and any help would be apreaceated
(befour my computer gets rabies)

http://www.dexrow.com
 
J

James Thiele

This probably will meet your needs:

import os
os.system("csound play.orc play.sco")

If you need more control try the subprocess module.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top