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.3.zip (13.8 kB view details)

Uploaded Source

File details

Details for the file Unum-4.1.3.zip.

File metadata

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

File hashes

Hashes for Unum-4.1.3.zip
Algorithm Hash digest
SHA256 b39263af58e12ad359fde498a88bbd00471bf15a5066f93bcc5db7f14cc46320
MD5 66302714c23a24b254f7e61ba427705b
BLAKE2b-256 2bbb3d2c5674ffc0ccd8f6caad289b144845d0105dc60214c0ff33b4ba10679a

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