def parse_unit(expression):
try:<EOL><INDENT>g = globals()<EOL>g.update(shorthands)<EOL>return float(eval(str(expression), g))<EOL><DEDENT>except:<EOL><INDENT>raise ValueError("<STR_LIT>" % expression)<EOL><DEDENT>
Evaluate a python expression string containing constants

       Argument:
        | ``expression``  --  A string containing a numerical expressions
                              including unit conversions.

       In addition to the variables in this module, also the following
       shorthands are supported: