Re: [Python.NET] Getting an open Python file handle into CLR
Dan Lenski <[email protected]>
| Newsgroups | gmane.comp.python.dotnet |
|---|---|
| Message-ID | <[email protected]> |
Jeffrey Bush <jeff@...> writes: > > > The problem is the conversion from a Python long to a C# number, not anything to do with the file handle itself. > This worked for me: (after your "print handle") > > > cs_handle = IntPtr.Overloads[Int64](Int64(handle)) > fs = FileStream(cs_handle, True) > Aha, thanks you very much! Looks like "Overloads" is the missing ingredient for C-style casting. I see now that that is in the docs, but I had overlooked it. Dan _________________________________________________ Python.NET mailing list - [email protected] https://mail.python.org/mailman/listinfo/pythondotnet