[Python.NET] Invoking script python from C#

Michael Niemaz michael.niemaz at xrce.xerox.com
Thu Nov 30 09:33:33 CET 2006


Hi all,
 I'm invoking a python script from C# using the
PythonEngine.RunSimpleString command. [BTW I couldn't figure out what
RunString was for ...]

Several things:
First, it does not 'run' unless I remove the main definition. It crashes
with that message : "AttributeError: 'module' object has no attribute
'argv'. And when I removed the main, it does nothing obviously ;-)

Which leads to my question: How to pass arguments to the python script?
Also, how to get its output stream and error stream?

Are all this possible at all using pythondotnet?

Thanx,

--mike





More information about the PythonDotNet mailing list