SolvedPrivate

Develop with .net DLLs on linux & Python

Posted on 2014-10-20
11
24 Views
Last Modified: 2016-02-19
Hi Experts.


I want to have python scripts running on a linux box

The problem is, it has to feed from a DLL.
The dll was compiled on windows, but relies on .net4.5 framework


The reason. Working with robotics custom microcontroller, with the sdk developed in windows (relies on 4.5)

The processing is done on a pc, but want to move it to linux


Any suggestions to make this work?



thanks in advance
0
Comment
Question by:Ess Kay
  • 7
  • 3
11 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40393074
You will probably have to completely rewrite it.  There is the Mono project http://www.mono-project.com/   Also read the 'Compatibilty' page because Mono does not support all of .NET 4.5: http://www.mono-project.com/docs/about-mono/compatibility/
0
 
LVL 25

Expert Comment

by:clockwatcher
ID: 40393533
IronPython (https://ironpython.codeplex.com/) runs under Mono.  So if the .Net library you have doesn't rely on any features that Mono doesn't currently support, it should be possible to develop against it using IronPython on linux.
0
 
LVL 15

Author Comment

by:Ess Kay
ID: 40393620
i was thinking about that,  its not open source so i cant rewrite it.  supposedly it requires 4.0,  and cant be run on compact framework.
0
 
LVL 15

Author Comment

by:Ess Kay
ID: 40393622
iron python gives issues setting up,  wont build off git.  ive circumvented it by  downloading the exe file and,  and running it straight from mono.  have not tried to add the dll yet,  was wondering if there are other options
0
 
LVL 15

Author Comment

by:Ess Kay
ID: 40393638
just I suspected:



Traceback (most recent call last):
  File "/home/xxyyzz/Projects/projects/r.py", line 9, in <module>
IOError: [Errno 2] Could not load file or assembly 'System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.



Looks like mono/iron python setup doesn’t have the .net 4.0 accompanied System.speech
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 25

Expert Comment

by:clockwatcher
ID: 40393667
The mono status for the .Net namespaces is at http://go-mono.com/status.  System.Speech hasn't been touched yet and I doubt it will be for a long while.

If you're hoping to run this on a non-MS platform and require System.Speech it's not going to happen.
0
 
LVL 15

Author Comment

by:Ess Kay
ID: 40394580
what if i copy the speech dll
0
 
LVL 15

Author Comment

by:Ess Kay
ID: 40394582
or use winehq for . net 4.0
0
 
LVL 25

Expert Comment

by:clockwatcher
ID: 40395925
Copying the speech dll definitely won't get it working under mono.  System.Speech is going to lean heavily on the native Win32 Speech libraries (http://msdn.microsoft.com/en-us/library/ms723627(v=vs.85).aspx) -- which is why I'm guessing you might have problems with it under wine too.  I doubt that anyone using Wine has worked on porting/testing those libraries.  Ultimately it depends on their dependencies, so it might work, but IMO, at the point that you're copying Microsoft windows DLLs over to wine, you might as well turn to using a VM.  It's worth a try and I wish you luck, but I don't think there's a whole lot of chance that you'll get it to work.
0
 
LVL 15

Author Comment

by:Ess Kay
ID: 40405650
still looking for alternatives.  may try to decompile
0
 
LVL 15

Author Closing Comment

by:Ess Kay
ID: 40708350
The true answer is, can't

The accepted answer has closest solution to obtaining goal, but due to the fact that these classes are reqritted and or adapted to mimic and use certain .net aspect, does not mean all classes are been adapted, and thus is not a complete solution
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction On September 29, 2012, the Python 3.3.0 was released; nothing extremely unexpected,  yet another, better version of Python. But, if you work in Microsoft Windows, you should notice that the Python Launcher for Windows was introduced wi…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now