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

Uploaded Source

Built Distributions

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

mathicsscript-4.0.0-py3.9.egg (83.8 kB view details)

Uploaded Egg

mathicsscript-4.0.0-py3.8.egg (83.8 kB view details)

Uploaded Egg

mathicsscript-4.0.0-py3.7.egg (83.4 kB view details)

Uploaded Egg

mathicsscript-4.0.0-py3.6.egg (83.3 kB view details)

Uploaded Egg

mathicsscript-4.0.0-py2.py3-none-any.whl (57.4 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: mathicsscript-4.0.0.tar.gz
  • Upload date:
  • Size: 56.9 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-4.0.0.tar.gz
Algorithm Hash digest
SHA256 2fbe40e969917fd8c54ffbcad4b88ac21f0513906800265945a9108bfbdd0cec
MD5 b16e63a6fbbe046c88f66694276a9cf9
BLAKE2b-256 b0a98815f9b03c2ed5652ed72a768709102127e4789c95c92131809899d86166

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-4.0.0-py3.9.egg
  • Upload date:
  • Size: 83.8 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-4.0.0-py3.9.egg
Algorithm Hash digest
SHA256 e1c0ade33c3083c7e48f7919d62f56fb07598aaad8aabedf06513b552355b8f3
MD5 875d55957ed2074f01c02c2128471666
BLAKE2b-256 4f5a4d8bd01c756fdf17d745e3cd33054d0a4e7a7952e3e11f25085531d288d9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-4.0.0-py3.8.egg
  • Upload date:
  • Size: 83.8 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-4.0.0-py3.8.egg
Algorithm Hash digest
SHA256 e073ab9283702b347f99b5ec4c301428aeb4e0d79aa8aa1107e16134495b10bb
MD5 d94b043024f9ddb4c050a1e09d361b5c
BLAKE2b-256 ba677818e074a800ff8e2eecfdea7a47ec1b4f78a3aca528df28ddf6fbf7d27f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-4.0.0-py3.7.egg
  • Upload date:
  • Size: 83.4 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-4.0.0-py3.7.egg
Algorithm Hash digest
SHA256 f3a8e28c6fc7930c04d18e4866b97029208099b2bf1bb951903084b12314e7b1
MD5 dfbe7c07ff301f2953883a03697434e7
BLAKE2b-256 c6a8545904f29843510c474bcf11f56763d59ea9982ae19bafcac57fa5d8ab5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-4.0.0-py3.6.egg
  • Upload date:
  • Size: 83.3 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-4.0.0-py3.6.egg
Algorithm Hash digest
SHA256 e2f20dfe6de3a7f9ce5856bbc88d025df9eeb4554ab0ff10cbf8ce5bda7d970d
MD5 43e272ced1da388f72b49acc35a39b17
BLAKE2b-256 5f8ad7b0d4e67e1fb76432566e2d736632c74fd44cf318ed321899d85ff9b6d1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-4.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 57.4 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-4.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 eeb6c39ade50d4f1c97b3268becf05aa789f525172cbf1110997dc56d7d96e97
MD5 9c441a288d10195033a863b7aec9a9dc
BLAKE2b-256 cfef5b7cbe196272f8b66e8052355fa458eb80d8f460ce144ee2cf57d977fba5

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