header

Categories::

Projects::

SAGE
M4RI
Code Snippets
ECrypt II
iliketotallyloveit

Stuff::

Junge Linke (de)
Battrock (de)

MiniMe::

BitBucket
Flickr
Mon, 23. Oct 2006

MAGMA Online Calculator

In case you haven’t noticed there is a free MAGMA Online Calculator (which is based on code by SAGE’s William Stein btw.). Also in case you haven’t noticed Python has pretty neat http support built-in. So some lines like

import urllib
cmd = urllib.quote(cmd)
url = "http://magma.maths.usyd.edu.au/calc/?input=%s"%cmd
fp = urllib.urlopen(url)
answer = fp.read()

allow you to use that online calculator in your Python program if you are willing to accept the horrible lag and the 20s timeout. If you put a couple of pre-/post-processing lines around it you end up with something somehow usable. Of course, you could also use it as a fall back to interface (a stripped down) MAGMA from SAGE if there is no local MAGMA installation available. But that would probably only cause bad vibes with the MAGMA people.

posted at: 12:52 :: permanent link

Valid XHTML 1.0 Strict Valid CSS! blosxom