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.

Download files

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

Source Distribution

mathicsscript-6.0.0.tar.gz (63.5 kB view details)

Uploaded Source

Built Distributions

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

mathicsscript-6.0.0-py3.10.egg (114.3 kB view details)

Uploaded Egg

mathicsscript-6.0.0-py3.9.egg (113.7 kB view details)

Uploaded Egg

mathicsscript-6.0.0-py3.8.egg (113.7 kB view details)

Uploaded Egg

mathicsscript-6.0.0-py3.7.egg (113.3 kB view details)

Uploaded Egg

mathicsscript-6.0.0-py3.6.egg (113.1 kB view details)

Uploaded Egg

mathicsscript-6.0.0-py3-none-any.whl (71.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mathicsscript-6.0.0.tar.gz
  • Upload date:
  • Size: 63.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for mathicsscript-6.0.0.tar.gz
Algorithm Hash digest
SHA256 4e0268236c5c19d6bb7c68b8935e91163f78e78761ff83ec094b441c8ff55ae3
MD5 f879eac57799ca656bba447b1431e09c
BLAKE2b-256 72551be71e2c7b661ea212a9c81823670f97b2ebc4750b4e9493790266399051

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-6.0.0-py3.10.egg
  • Upload date:
  • Size: 114.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for mathicsscript-6.0.0-py3.10.egg
Algorithm Hash digest
SHA256 c51009a82135db3712f0b157aa332aaff5eaad542f04dc3255a60368c70a5d1e
MD5 11948ad4beeb9f380e75f3d8d57c6c04
BLAKE2b-256 0574356f2b4b8d9a58348bc29eea8fb8780371d02bb456eef4aeaa5e964c85a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-6.0.0-py3.9.egg
  • Upload date:
  • Size: 113.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for mathicsscript-6.0.0-py3.9.egg
Algorithm Hash digest
SHA256 e5274c2fe01a5543d4e01ac48cafd3af7ce65c08b401715eb42a28c2d57bbbf0
MD5 df6581d31071cbc38fee3d3dd8a5650e
BLAKE2b-256 700027b2f276b8fa8ab74ba5ed57c67f7674f39e44a3739e7f4ae9ff5f1d30d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-6.0.0-py3.8.egg
  • Upload date:
  • Size: 113.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for mathicsscript-6.0.0-py3.8.egg
Algorithm Hash digest
SHA256 053d4cdb8a0d28531cafe6825e41bc47dcf88cf6802ee0f4e1021cc933a6fdc3
MD5 a2598e2f0a3d4449256010968272f5d6
BLAKE2b-256 6e2989d1bd7668486c5c4640ff30ced8a8afecbe8a32b4a81383311e9760100b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-6.0.0-py3.7.egg
  • Upload date:
  • Size: 113.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for mathicsscript-6.0.0-py3.7.egg
Algorithm Hash digest
SHA256 cb297bd72ca161f6f7826eebb43f9e7d89be470a5914b87d163055b125b63d09
MD5 08f2204ae41459d7019e220c8d5c874b
BLAKE2b-256 0743b86408b54bc00de669e650170f9d5021fb3846ff774faf437b1e3eb2f7f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-6.0.0-py3.6.egg
  • Upload date:
  • Size: 113.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for mathicsscript-6.0.0-py3.6.egg
Algorithm Hash digest
SHA256 1973790f2e5ec7af2d42b04d1c8e09dd9481d865ee9d90c89ffc4126c1777832
MD5 04dcfb74fc926648c0c7d2a74d452599
BLAKE2b-256 c3c1118519b88543ff1925521ab03d511bacdafc3f946603f6f786f47b40d95d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mathicsscript-6.0.0-py3-none-any.whl
  • Upload date:
  • Size: 71.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for mathicsscript-6.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbd96d27d78e3a2cd0c44698ce6703f4f8a80a02c68ebc3a4a0406f1106da684
MD5 45b8d8ae0ae2c96299bf720371b0d4de
BLAKE2b-256 020ff54a1608059ab54551a40a771ecb337033154f8d0dda0c10727fa2018d13

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