SolvedPrivate

Develop with .net DLLs on linux & Python

Posted on 2014-10-20
11
26 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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
 
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Weird Samba Connectivity Issue... 7 39
Python 3.5: SQL Results to CSV dump 8 53
Batch file or script with password 22 38
number in printf 13 27
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

805 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