petervizi / python-eeml

A python package for generating eeml documents.
http://petervizi.github.com/python-eeml
GNU General Public License v3.0
43 stars 11 forks source link

Support for other units? #14

Closed electrodynatronic closed 11 years ago

electrodynatronic commented 11 years ago

Hey, thanks for putting this out. Was just exactly what I needed. I added a Bogus unit to my local copy for testing. Do you plan to add support for additional units? Unit-less quantities? Would you like others to contribute? Cheers.

class Bogus(Unit): """ This is the Bogus unit class. """

def __init__(self):
    """
    Initialize the `Unit` parameters with Bogus.
    """
    Unit.__init__(self, 'Bogus', 'derivedSI', u'!')
petervizi commented 11 years ago

Hi,

I haven't realy planned to put too much effort into including all units, as your example shows a simple three-liner is enough to use whatever you like. But of course you are welcomed to submit patches to this lib. I'm looking forward to it!