# Path: molmod/units.py
# def parse_unit(expression):


import sys
import os
import platform
import datetime
import getpass
import codecs
import locale
import functools
    from time import process_time
    from time import clock as process_time
from contextlib import contextmanager
from molmod.units import kjmol, kcalmol, electronvolt, angstrom, nanometer, \
    femtosecond, picosecond, amu, deg, gram, centimeter
    do_medium = property(lambda self: self._level >= self.medium)
    do_high = property(lambda self: self._level >= self.high)
    do_debug = property(lambda self: self._level >= self.debug)

    def _pass_color_code(self, code):
        if self._file.isatty():
            return code
        else:
            return ''

    reset =     property(functools.partial(_pass_color_code, code="\033[0m"))
    bold =      property(functools.partial(_pass_color_code, code="\033[01m"))
    teal =      property(functools.partial(_pass_color_code, code="\033[36;06m"))
    turquoise = property(functools.partial(_pass_color_code, code="\033[36;01m"))
    fuchsia =   property(functools.partial(_pass_color_code, code="\033[35;01m"))
    purple =    property(functools.partial(_pass_color_code, code="\033[35;06m"))
    blue =      property(functools.partial(_pass_color_code, code="\033[34;01m"))
    darkblue =  property(functools.partial(_pass_color_code, code="\033[34;06m"))
    green =     property(functools.partial(_pass_color_code, code="\033[32;01m"))
    darkgreen = property(functools.partial(_pass_color_code, code="\033[32;06m"))
    yellow =    property(functools.partial(_pass_color_code, code="\033[33;01m"))
    brown =     property(functools.partial(_pass_color_code, code="\033[33;06m"))
    red =       property(functools.partial(_pass_color_code, code="\033[31;01m"))

    def set_file(self, f):
        # Wrap sys.stdout into a StreamWriter to allow writing unicode.
        self._file = f
        self.add_newline = False

    def set_level(self, level):

# Path: molmod/units.py
# def parse_unit(expression):


# Path: molmod/log.py
import sys
import os
import platform
import datetime
import getpass
import codecs
import locale
import functools
    from time import process_time
    from time import clock as process_time
from contextlib import contextmanager
from molmod.units import kjmol, kcalmol, electronvolt, angstrom, nanometer, \
    femtosecond, picosecond, amu, deg, gram, centimeter

    do_medium = property(lambda self: self._level >= self.medium)
    do_high = property(lambda self: self._level >= self.high)
    do_debug = property(lambda self: self._level >= self.debug)

    def _pass_color_code(self, code):
        if self._file.isatty():
            return code
        else:
            return ''

    reset =     property(functools.partial(_pass_color_code, code="\033[0m"))
    bold =      property(functools.partial(_pass_color_code, code="\033[01m"))
    teal =      property(functools.partial(_pass_color_code, code="\033[36;06m"))
    turquoise = property(functools.partial(_pass_color_code, code="\033[36;01m"))
    fuchsia =   property(functools.partial(_pass_color_code, code="\033[35;01m"))
    purple =    property(functools.partial(_pass_color_code, code="\033[35;06m"))
    blue =      property(functools.partial(_pass_color_code, code="\033[34;01m"))
    darkblue =  property(functools.partial(_pass_color_code, code="\033[34;06m"))
    green =     property(functools.partial(_pass_color_code, code="\033[32;01m"))
    darkgreen = property(functools.partial(_pass_color_code, code="\033[32;06m"))
    yellow =    property(functools.partial(_pass_color_code, code="\033[33;01m"))
    brown =     property(functools.partial(_pass_color_code, code="\033[33;06m"))
    red =       property(functools.partial(_pass_color_code, code="\033[31;01m"))

    def set_file(self, f):
        # Wrap sys.stdout into a StreamWriter to allow writing unicode.
        self._file = f
        self.add_newline = False

    def set_level(self, level):

        if level < self.silent or level > self.debug: