Mathematica-style notebook in Python

R

Rick Muller

I was wondering whether anyone has considered writing a
Mathematica-style notebook in Python. I use Python to do a lot of
scientific analysis, and I really like it's power. But what I always
envy about my friends who use Mathematica is the notebooks they
generate, which contain plots, annotations, and other information, in
a format that can be reloaded easily when you want to check your work.

Before I start doing something like this, has anyone else considered
it?
 
E

Erik Lechak

I was wondering whether anyone has considered writing a
Mathematica-style notebook in Python. I use Python to do a lot of
scientific analysis, and I really like it's power. But what I always
envy about my friends who use Mathematica is the notebooks they
generate, which contain plots, annotations, and other information, in
a format that can be reloaded easily when you want to check your work.

Before I start doing something like this, has anyone else considered
it?

I have been working the last several months on just that issue. It is
a library that contains interactive plotting, block diagram, imaging,
and text rendering capabilities. It is written in 100% python. It
currently can use either wxWindows or pygame to display its diagrams
(I am working on TK now ... others to come). The nice thing about it
is no matter what underlying GUI library you use to display the
diagram it always looks the same.

I am about ready to release the second version of the library (its
called Pyxel). BTW its opensource - free for commercial and
opensource use.

I can send anyone the code that wants to preview it before the
release. Just drop me a line. I could use some help on the plotting
aspect, if anyone is interested.

Thanks,
Erik Lechak
(e-mail address removed)
 
D

David E. Konerding DSD staff

You could use my "Py-ML" library which provides Mathematica support in Python.

http://py-ml.sourceforge.net/

You should (in theory- I never tried it) be able to create notebooks programmatically
and control them from Python.

Here's an example of using Py-ML:
function = MathematicaFunction("Plus",MathematicaInteger(1),[MathematicaSymbol("x")])
print function
Plus[1,x]
Plus[1,x]
or
Plus[1,x]


More complicated functions, such as integrals, are entered easily.
The integral of x^2 with x varying from 0 to 2:
function = Integrate(Power("x",2), List("x",0,2))



.... unfortunately, I don't really use Mathematica any more (it's just too expensive and it never simplified
any interesting integrals for me), so Py-ML isn't really an active software project any more.
There are a lot of interesting opportunities for further development.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top