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_ and of the features mentioend 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-3.3.0.tar.gz (52.5 kB view details)

Uploaded Source

Built Distributions

mathicsscript-3.3.0-py3.9.egg (80.5 kB view details)

Uploaded Source

mathicsscript-3.3.0-py3.8.egg (80.5 kB view details)

Uploaded Source

mathicsscript-3.3.0-py3.7.egg (80.1 kB view details)

Uploaded Source

mathicsscript-3.3.0-py3.6.egg (80.1 kB view details)

Uploaded Source

mathicsscript-3.3.0-py2.py3-none-any.whl (55.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: mathicsscript-3.3.0.tar.gz
  • Upload date:
  • Size: 52.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for mathicsscript-3.3.0.tar.gz
Algorithm Hash digest
SHA256 6ff7d022959f1d176ee297792b0fd440c69a41e1d5ec75527a41f7d2184f6d0a
MD5 930d7ad9117f6e2b9b0071c6d23d912b
BLAKE2b-256 640c12a38bc3887c080ad7f7ed9856527e170537a3ab977e6e8b1fb74146a5aa

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mathicsscript-3.3.0-py3.9.egg
  • Upload date:
  • Size: 80.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for mathicsscript-3.3.0-py3.9.egg
Algorithm Hash digest
SHA256 cc0759ec0877273452dbdd851fea003945ad7960cab341f1cd54387ea588bb63
MD5 be5305c63ab6760d32c2e3677563a4e1
BLAKE2b-256 e13292708c39350f7a852529a209273a62ca9d5689970b1dff1edf6d36816acd

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mathicsscript-3.3.0-py3.8.egg
  • Upload date:
  • Size: 80.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for mathicsscript-3.3.0-py3.8.egg
Algorithm Hash digest
SHA256 0688bf640199c996bc486125e9035d9c1213936c6eaccb6c17f2c3f02e9a77b4
MD5 9e6d3fb4aceb3b28b4b3219a031ce1b1
BLAKE2b-256 dafe17e39b31819c280cbe4f0b323f47f2286f0dc6fc6e6aba55f00b6fbcd327

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mathicsscript-3.3.0-py3.7.egg
  • Upload date:
  • Size: 80.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for mathicsscript-3.3.0-py3.7.egg
Algorithm Hash digest
SHA256 17883a9844b99578294231579482ce488e2fd0311007733fdfc36ee298a02e12
MD5 9d7882c229cc3fa8c0ce7f4f61987186
BLAKE2b-256 3b2dc524dfa0a34cb2275aef5aa143c628b6629088ee4877d2ba110d6352bd17

See more details on using hashes here.

Provenance

File details

Details for the file mathicsscript-3.3.0-py3.6.egg.

File metadata

  • Download URL: mathicsscript-3.3.0-py3.6.egg
  • Upload date:
  • Size: 80.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for mathicsscript-3.3.0-py3.6.egg
Algorithm Hash digest
SHA256 83d73d12fb21f7702840b9216b1cae97370124e4ee414dbb1bcfdccab562e9d7
MD5 4f625f389836225690e6a5c3251ec4a6
BLAKE2b-256 13a5b4a98745853d3215cb28a75f71222a4ffd4b674f1c45113b795bb792b659

See more details on using hashes here.

Provenance

File details

Details for the file mathicsscript-3.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: mathicsscript-3.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 55.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for mathicsscript-3.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3ff88b8824d19ef05d45df944dbdb4b706601a172812adf28d3e64aca570829b
MD5 537851d88d68b6443331964ae32d9359
BLAKE2b-256 a5a71c94d97687c61b0723fba16682b0bb16815cc7de2469160345327e63c190

See more details on using hashes here.

Provenance

Supported by

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