On Fri, Jun 12, 2009 at 2:49 AM, eShopping
wrote:
>
> Hm .does this mean we are snookered on Win XP?
Well, strictly using python anyway. I'm not sure precisely how the ctypes
module works, but it's a fairly simple amount of code in assembly to push
characters into the keyboard buffer. I pre
"eShopping" wrote
Or use the Python wrapper around expect - pyexpect???
Alan G
Installed pexpect and rewrote the code to look like this:
Now I get these errors:
Traceback (most recent call last):
File "C:\Projects\Active\Alun\US_DOE_EOR\test_poly.py", line 1,
in -toplevel-
import p
"Tino Dai" wrote
>
>I know that this is a python group but you might want to try the open
> source utility called Expect. It does what you need it to do without
> having
> having to go through this trial and error process with subprocess.
> http://expect.nist.gov/
Or use the Python wrappe
On Thu, Jun 11, 2009 at 1:15 PM, Alan Gauld wrote:
>
> "Tino Dai" wrote
>
>>
>> I know that this is a python group but you might want to try the open
>> source utility called Expect. It does what you need it to do without
>> having
>> having to go through this trial and error process with subpr
"Tino Dai" wrote
I know that this is a python group but you might want to try the open
source utility called Expect. It does what you need it to do without
having
having to go through this trial and error process with subprocess.
http://expect.nist.gov/
Or use the Python wrapper around
Hi,
I know that this is a python group but you might want to try the open
source utility called Expect. It does what you need it to do without having
having to go through this trial and error process with subprocess.
http://expect.nist.gov/
-Tino
On Thu, Jun 11, 2009 at 9:45 AM, eShopping
w
>> eShopping wrote:
>>> import subprocess
>>> x = subprocess.Popen(args="poly.exe",stdin=subprocess.PIPE)
>>> for item in ["polyin.dat", "polyout.dat", "polyout.plt"]:
>>> x.stdin.write('%s\n' % item)
>>> but got the same error message
>>
>> Above code would seem to be correct.
>>
>> Are you
eShopping wrote:
At 13:26 11/06/2009, you wrote:
Are you sure the Fortran program accepts the names?
One easy way to test this is to try
C:\> poly.exe < poly_files.txt
in a CMD program (or COMMAND or whatever the console program is
called nowadays at Win* systems).
Tried piping the input as
"eShopping" wrote
C:\> poly.exe < poly_files.txt
in a CMD program (or COMMAND or whatever the console program is called
nowadays at Win* systems).
Tried piping the input as suggested but POLY ignores the pipe and just
asks me for the names of the files as if we were in interactive mode.
eShopping wrote:
> At 13:26 11/06/2009, you wrote:
>> eShopping wrote:
>>> import subprocess
>>> x = subprocess.Popen(args="poly.exe",stdin=subprocess.PIPE)
>>> for item in ["polyin.dat", "polyout.dat", "polyout.plt"]:
>>> x.stdin.write('%s\n' % item)
>>> but got the same error message
>>
>> Ab
At 13:26 11/06/2009, you wrote:
eShopping wrote:
import subprocess
x = subprocess.Popen(args="poly.exe",stdin=subprocess.PIPE)
for item in ["polyin.dat", "polyout.dat", "polyout.plt"]:
x.stdin.write('%s\n' % item)
but got the same error message
Above code would seem to be correct.
Are you
eShopping wrote:
import subprocess
x = subprocess.Popen(args="poly.exe",stdin=subprocess.PIPE)
for item in ["polyin.dat", "polyout.dat", "polyout.plt"]:
x.stdin.write('%s\n' % item)
but got the same error message
Above code would seem to be correct.
Are you sure the Fortran program ac
Hi
I have a legacy (FORTRAN) program called POLY.EXE which asks the
user interactively for three inputs (file names) from the
keyboard. I would like to run this program in batch and tried to
replace the interactive prompts with file names stored in a separate
file using this Python script:
On Thu, Jun 11, 2009 at 3:08 AM, Alun Griffiths <
alun.griffi...@dsl.pipex.com> wrote:
> Hi
>
> I have a legacy (FORTRAN) program called POLY.EXE which asks the user
> interactively for three inputs (file names) from the keyboard. I would like
> to run this program in batch and tried to replace t
Hi
I have a legacy (FORTRAN) program called POLY.EXE which asks the user
interactively for three inputs (file names) from the keyboard. I
would like to run this program in batch and tried to replace the
interactive prompts with file names stored in a separate file using
this Python script:
15 matches
Mail list logo