[Python.NET] Getting an open Python file handle into CLR

Dan Lenski dlenski at gmail.com
Tue Jul 21 20:12:37 CEST 2015


Ron Harding via PythonDotNet <pythondotnet at ...> writes:

> perhaps re-directed command line calls for stdin, stdout, stderr in c# 
interacting with python i/o command line calls(although in python it is 
common practice to daisy chain commands).

Unfortunately, I cannot redirect the output of the C# library to a 
convenient filehandle like stdout/stderr; I need to be specify a 
FileStream object.

It pretty much comes down to this: how do I cast a win32 file handle to an 
IntPtr?

Thanks,
Dan



More information about the PythonDotNet mailing list