Skip to main content

Units in Python

Project description

*************************************************************************
* *
* Unum 4.1 *
* Units in Python *
* *
* (c) 2000-2003 Pierre Denis *
* (c) 2009-2010 Chris MacLeod *
* *
*************************************************************************

-------------------------------------------------------------------------
* Visible changes since Unum 4.0:
-------------------------------------------------------------------------

- To support Python 2.5 and higher, the method Unum.as was renamed to
Unum.asUnit; this was necessary since "as" became a reserved word.
If you are still using old versions of Python, both names are
available.

- In addition to unit names in uppercase, unit names in the correct case
are now available. So, both "kg" and "KG" refer to the kilogram Unum,
and both "eV" and "EV" refer to the electron volt Unum.

- Value types are no longer automatically coerced to floats. This allows
the fractions.Fraction standard library type to be used, but may
introduce incompatibilities with old code from integer vs. floating
point division. In Python 3.x there is no problem.

- Prefixed versions of the 7 base SI units are supplied. So you can use
"cm", "ns", "kA", "mK", "pmol", "Mcd", and "g" out of the box.

-------------------------------------------------------------------------
* Prerequisites:
-------------------------------------------------------------------------

- Python 2.2 or higher. Python 3.x should work as well, but please
report any bugs.

-------------------------------------------------------------------------
* To install Unum:
-------------------------------------------------------------------------

- unzip Unum installation files to any directory.
- cd <install-directory>
- python setup.py install
this will install Unum packages in your Python site-packages directory
i.e. it will create the directory <python-site-packages-dir>/unum
- if the installation is successful (see below),
you can safely remove <your-install-directory>

- alternately, if you have setuptools installed you can do:
"easy_install unum" to obtain it online from PyPI.

- On Windows you may need to do "python -m easy_install unum" instead.
- On Linux you may need to do "sudo easy_install unum".

-------------------------------------------------------------------------
* To run the test cases:
-------------------------------------------------------------------------

- cd <install-directory>
- python setup.py test

-------------------------------------------------------------------------
* Other information :
-------------------------------------------------------------------------

- Website: http://bitbucket.org/kiv/unum/
- E-mail : ChrisM6794@gmail.com
- Old site : http://home.tiscali.be/be052320/Unum.html
(for a comprehensive tutorial, papers, etc.)


=========================================================================

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

Unum-4.1.2.zip (17.2 kB view details)

Uploaded Source

File details

Details for the file Unum-4.1.2.zip.

File metadata

  • Download URL: Unum-4.1.2.zip
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Unum-4.1.2.zip
Algorithm Hash digest
SHA256 fe5ca0a13f5cdaeb1686e688d95b56ba2db97e50922bb12b6f713d3dd2a93bfc
MD5 a53bcbb0ecc87e7f9983a84ddd700fdf
BLAKE2b-256 6c8c65355cac05a69f681cb3a0d7486f654392416847ca15c2f36617bb139677

See more details on using hashes here.

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