os.popen: writing to...?

James Lockley poseidon_cma at my-deja.com
Wed Jan 31 14:42:23 EST 2001


hi all

am tryng to automate a process using python to control the calling.  At
the moment have python calling windows batch files using os.popen,
which works fine.

i now want to go to the next step and get rid of the batch files...
i need to open a pipe to a command and then write the command arguments
to it.

as far as i could make out, this should work:

>>> abaqus='c:\\abaqus\\5.8-14\\abaqus.exe'
>>> abq=os.popen(abaqus,'w')
>>> abq.write('post')

but i get this:

Traceback (innermost last):
  File "<interactive input>", line 1, in ?
IOError: [Errno 22] Invalid argument


thanks in anticipation
james




Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list