Skip to main content

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.

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.1.tar.gz (55.6 kB view details)

Uploaded Source

Built Distributions

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

mathicsscript-3.3.1-py3.9.egg (81.6 kB view details)

Uploaded Egg

mathicsscript-3.3.1-py3.8.egg (81.6 kB view details)

Uploaded Egg

mathicsscript-3.3.1-py3.7.egg (81.2 kB view details)

Uploaded Egg

mathicsscript-3.3.1-py3.6.egg (81.1 kB view details)

Uploaded Egg

mathicsscript-3.3.1-py2.py3-none-any.whl (56.2 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: mathicsscript-3.3.1.tar.gz
  • Upload date:
  • Size: 55.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for mathicsscript-3.3.1.tar.gz
Algorithm Hash digest
SHA256 15b10692a651a6d320ab49002aba205073c43e17d9aaa869c2a06017a1c9eece
MD5 404061443425feda07011106297bc930
BLAKE2b-256 8272183901a67da5a04e5047d58a4261b822a8580fe43ab36beca42c4cc98588

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-3.3.1-py3.9.egg
  • Upload date:
  • Size: 81.6 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for mathicsscript-3.3.1-py3.9.egg
Algorithm Hash digest
SHA256 e7feaa63456b39540f7e458cd6a8dcfe4a9d28dc468c5b8d3b3af2fc8ed62fae
MD5 70cfb5e258508b22562473c3e8f82c34
BLAKE2b-256 5728ca41cf577ba0084a372d4bad3031d18e381542186f71d00ec364baa879c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-3.3.1-py3.8.egg
  • Upload date:
  • Size: 81.6 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for mathicsscript-3.3.1-py3.8.egg
Algorithm Hash digest
SHA256 65e690de3a1084de7baf6eb43a039b85bc2ab431aa226f6cb3641ee6f9cf2b81
MD5 096b7e94098bb38a7a255a0890a727fe
BLAKE2b-256 76b503d95d856ae35dd72b555e192d86d0be49d6a9b052fe0165ea68194dcd51

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-3.3.1-py3.7.egg
  • Upload date:
  • Size: 81.2 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for mathicsscript-3.3.1-py3.7.egg
Algorithm Hash digest
SHA256 6e216b2133a2db77d9bea616fb9156f03c7fd295306750cb107a1b379ffe4fbb
MD5 a909d971c3cd4558e9f01d0ed7b4d190
BLAKE2b-256 3ff3b0cd5b3d40bec136f572cfb18d2afd7a9ebbd615a22af4a2e0e4bf3a8adf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-3.3.1-py3.6.egg
  • Upload date:
  • Size: 81.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for mathicsscript-3.3.1-py3.6.egg
Algorithm Hash digest
SHA256 23388a26292c2d3f390887002e80481d831936c5618c252dfba8f05e00e24734
MD5 7e9aa944f1577fd3cf2c13980213a0f9
BLAKE2b-256 b6427d3152f3266a1c92d74dba85bef4ffe44cc88780a842cac32140a41bd11b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mathicsscript-3.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4396a49f00280cd365da1a9a148ad342c063469f99fdc7148ae1d9c12667c461
MD5 3e0feaba3ad5d28d4209197d0bf7eac0
BLAKE2b-256 c87cc2d3658642141d6761a7805ab43c267ae90e6bcd74c979ac48defe9ac6fa

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 Sentry Error logging StatusPage Status page