Possible to use Mathematica from other programming languages (python/C#)?
Asked Answered
W

5

5

Is it possible to use Mathematica's computing capabilities from other languages? I need to do some complex operations (not necessarily symbolic, btw), and it'd be pretty sweet to be able to just call Mathematica's functions or running Mathematica's code right from my python/c#'s program.

Is it possible?

Wallen answered 23/11, 2009 at 14:45 Comment(1)
You may find the answers to https://mcmap.net/q/871131/-complex-calculations-in-c helpful as well.Meldon
F
5

Looks like there is a MathLink API you can use from C#, c or Java, have you checked this out?

http://reference.wolfram.com/mathematica/guide/MathLinkAPI.html

Fatimahfatimid answered 23/11, 2009 at 14:52 Comment(0)
W
4

To links about usage of python and .Net (for C#)

Wieland answered 23/11, 2009 at 14:53 Comment(1)
"Currently, PYML supports Mathematica 2.2 and 3.0."Wallen
H
4

Perhaps the easiest way is to make the Mathematica program its own self-contained script and just call it as a system call or pipe stuff to/from it via stdin/stdout. Here's how to do that:

Call a Mathematica program from the command line, with command-line args, stdin, stdout, and stderr

Highflown answered 24/11, 2009 at 7:21 Comment(0)
I
1

I haven't used it, but this looks interesting. Looks like you can call Mathematica code directly from your C# app using .NET/Link (a product by Wolfram).

Improve answered 23/11, 2009 at 14:52 Comment(0)
M
1

Yes but there are some subtleties. I covered Mathematica .NET interoperability in my book F# for Scientists but dropped the subject for its successor F# for Technical Computing.

Mockery answered 14/2, 2010 at 16:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.