You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
on Linux with Mono FileStream(String, FileMode) says no constructor matches #187
Ubuntu-14.04LTS
Python-2.7
Python.NET latest development branch with #119 patch for setup.py
Mono-4.0.12 (Xamarin)
I know that Python.NET isn't officially supported on Linux with mono, but I thought for posterity I should report this and maybe I or someone else will find a fix for at a later date.
>>> import clr
>>> clr.AddReference("System.IO")
>>> from System.IO import FileStream, FileMode
>>> fs = FileStream('myfile.net', FileMode.Open)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-22-0478243743b3> in <module>()
----> 1 fs = FileStream('myfile.net', FileMode.Open)
TypeError: no constructor matches given arguments
The same exact commands work on IronPython, so I don't think it's mono. I think the way to solve this is to rebuild pythonnet with debugging and attach GDB to the python process and step through the .NET code. If/when I do this, I will update this ticket. ✌️
mono/linux is supported, so what you're trying to do is perfectly reasonable! There were some changes to the type conversion that may have broken this - try pull the #176 PR and see if that helps (it may not get merged in exactly its current state, but some fix like the one in there is needed).
Activity
tonyroberts commentedon Mar 15, 2016
mono/linux is supported, so what you're trying to do is perfectly reasonable! There were some changes to the type conversion that may have broken this - try pull the #176 PR and see if that helps (it may not get merged in exactly its current state, but some fix like the one in there is needed).
den-run-ai commentedon Mar 23, 2016
@mikofski this special case for
enumshas been merged to default develop branch. let us know if it does not work:#176
JimSEOW commentedon Jun 12, 2016
please share links which suggest it is possible to use python.NET in xamarin mono
den-run-ai commentedon Jun 12, 2016
@JimSEOW can you open a separate issue for this? Mono from Xamarin is mainly used on Android and iOS, so mention your platform of interest.