gnuplot.py IOError when writing to pgnuplot stdin pipe

Moray B. Grieve mbg at apama.com
Tue May 21 13:07:01 EDT 2002


I'm using gp371win32 on Windows2000. When I try to run the demo.py module I get the following

Traceback (most recent call last):
  File "C:\Python22\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 301, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\Python22\Lib\site-packages\Gnuplot\demo.py", line 130, in ?
    demo()
  File "C:\Python22\Lib\site-packages\Gnuplot\demo.py", line 56, in demo
    g.reset()
  File "C:\Python22\lib\site-packages\Gnuplot\_Gnuplot.py", line 361, in reset
    self('reset')
  File "C:\Python22\lib\site-packages\Gnuplot\_Gnuplot.py", line 205, in __call__
    self.gnuplot(s)
  File "C:\Python22\lib\site-packages\Gnuplot\gp_win32.py", line 119, in __call__
    self.write(s + '\n')
IOError: [Errno 22] Invalid argument


The problem lies in writing to the stdin of the pgnuplot.exe, via a win32 pipe. If I do

stdin = win32pipe.popen("pgnuplot", "w")
stdin.write("reset")

the same exception is thrown. Can anyone shed any light on what is happening?

With many thanks,
Moray Grieve









More information about the Python-list mailing list