Skip to main content

A general-purpose computer algebra system.

Project description

CI status Pypi Installs Latest Version Supported Python Versions

Packaging status

mathicsscript is a command-line interface to Mathics.

screenshot

See the screenshot directory for a description and another example.

Features

  • prompt_toolkit and GNU Readline terminal interaction. This includes:
    • saving command history between sessions.

    • variable completion, even for symbol names like \\[Sigma]

    • limited ESC keyboard input; for example esc p esc is π

  • Syntax highlighting using mathics-pygments which includes dynamically created variables and functions.

  • Automatic detection of light or dark terminal background color.

  • Optional Graphics rendering via matplotlib for 2D graphics, and Asymptote for 3D graphcs.

  • Entering and displaying Unicode symbols such as used for Pi or Rule arrows

  • Provision for running in non-interactive batch mode which an be used inside POSIX shells

Installing

To install, run

$ make install

To install from git sources so that you run from the git source tree:

$ make develop

Running

Once install run using mathicsscript:

$ mathicsscript
Mathicscript: 3.2.2.dev0, Mathics 3.1.0.dev0
on CPython 3.7.10 (default, Feb 23 2021, 10:13:46)
using SymPy 1.8, mpmath 1.2.1, numpy 1.20.2, cython 0.29.22

Copyright (C) 2011-2021 The Mathics Team.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
See the documentation for the full license.

Quit by evaluating Quit[] or by pressing CONTROL-D.

In[1]:=

For batch use:

$ mathicsscript -c "N[Pi, 30]"
3.14159265358979323846264338328

To read from a file

In file /tmp/test.m:

sum=2+2
integral=Integrate[1,x]
Print["Results: ",{sum,integral}]

Feeding this into mathicsscript:

$ mathicsscript --no-prompt </tmp/test.m
4
x
Results: {4, x}
None

For a full list of options, type mathicsscript --help.

Why not IPython via Jupyter?

There will always be a need for simple terminal-like interaction. Although there is IPython support via Jupyter all of this is pretty heavy-weight. To code to this protocol, a developer needs to write a kernel, and use a wire protocol. This adds complexity not only for the person developing this package, but also for the user who needs to load the extra layers that aren’t used. And when something goes wrong, it is harder to track down problems.

At the other end of the spectrum, if the dependencies of this package are too onerous and you want even simpler, lighter-weight terminal interaction without any of the features mentioned above, use mathics which is distributed as part of the core Mathic3 package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mathicsscript-5.0.0.tar.gz (59.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mathicsscript-5.0.0-py3.10.egg (88.2 kB view details)

Uploaded Egg

mathicsscript-5.0.0-py3.9.egg (87.7 kB view details)

Uploaded Egg

mathicsscript-5.0.0-py3.8.egg (87.8 kB view details)

Uploaded Egg

mathicsscript-5.0.0-py3.7.egg (87.4 kB view details)

Uploaded Egg

mathicsscript-5.0.0-py3-none-any.whl (59.1 kB view details)

Uploaded Python 3

File details

Details for the file mathicsscript-5.0.0.tar.gz.

File metadata

  • Download URL: mathicsscript-5.0.0.tar.gz
  • Upload date:
  • Size: 59.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for mathicsscript-5.0.0.tar.gz
Algorithm Hash digest
SHA256 a1042524385eac828c641a258624ffecaae677fc16c6b130e9e42b427352cc2b
MD5 fc6be151f954ed99a4b1c1c35f813672
BLAKE2b-256 10c70696b0448c6acc825ef2f97e0251ed42b2ffc236b1f461cb7995a99c3cd7

See more details on using hashes here.

File details

Details for the file mathicsscript-5.0.0-py3.10.egg.

File metadata

  • Download URL: mathicsscript-5.0.0-py3.10.egg
  • Upload date:
  • Size: 88.2 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for mathicsscript-5.0.0-py3.10.egg
Algorithm Hash digest
SHA256 d31659f69df9f510718b8fdec4337e5220f36e211c5cd3b1d649f9f1e9d1d727
MD5 898dfe2971467f515f98c4a80ed8bcd9
BLAKE2b-256 397b9df710cf30d010ae2c7a5e1e559f1182f8509df82093ce85c72f976f5777

See more details on using hashes here.

File details

Details for the file mathicsscript-5.0.0-py3.9.egg.

File metadata

  • Download URL: mathicsscript-5.0.0-py3.9.egg
  • Upload date:
  • Size: 87.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for mathicsscript-5.0.0-py3.9.egg
Algorithm Hash digest
SHA256 496cc067aac5305a6742cf8d7ae9e89f9337b2ff4d9faa9a21343904c42acd91
MD5 3db334420ae95e33d158f9798976ed83
BLAKE2b-256 2251904530c04c1879b1f510df90b7bf221902934b9e256490abd3b2cb52c4ee

See more details on using hashes here.

File details

Details for the file mathicsscript-5.0.0-py3.8.egg.

File metadata

  • Download URL: mathicsscript-5.0.0-py3.8.egg
  • Upload date:
  • Size: 87.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for mathicsscript-5.0.0-py3.8.egg
Algorithm Hash digest
SHA256 4c5a68b5e3506d9825a0b1d2bdeebcc47544912c56617e945c4586584a3e1142
MD5 7d51a1c166f271cd64d983ff2a0cc20b
BLAKE2b-256 ed259297d5c2c52fd2369a3599cd0901f79b761c5f2b4e36a6177b008b2f295e

See more details on using hashes here.

File details

Details for the file mathicsscript-5.0.0-py3.7.egg.

File metadata

  • Download URL: mathicsscript-5.0.0-py3.7.egg
  • Upload date:
  • Size: 87.4 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for mathicsscript-5.0.0-py3.7.egg
Algorithm Hash digest
SHA256 ef034a018177133bda609b633e01553b31a415c24bda133092954918ed6f2382
MD5 4137d2e83b287a8e2fd06c6ce9c9178d
BLAKE2b-256 6bd81b9bf58bde53c2aac5cb1c84e03293e8b499ed84250e9469922229da3f37

See more details on using hashes here.

File details

Details for the file mathicsscript-5.0.0-py3-none-any.whl.

File metadata

  • Download URL: mathicsscript-5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 59.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for mathicsscript-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6a9a767f6299059898926077ba202d75586bb4fca00a409772ee92ee54bb440
MD5 60839197bfb0188b3db2e903318244b2
BLAKE2b-256 7daab72485df0c835da0cd3c4b4526d21fc424746fab8c387867a54da27256ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page