Back to index

plone3  3.1.7
common.py
Go to the documentation of this file.
00001 """some common utilities
00002 """
00003 import logging
00004 from time import time
00005 from types import UnicodeType, StringType
00006 
00007 STRING_TYPES = (UnicodeType, StringType)
00008 
00009 class MimeTypeException(Exception):
00010     pass
00011 
00012 # logging function
00013 logger = logging.getLogger('MimetypesRegistry')
00014 
00015 def log(msg, severity=logging.INFO, id='MimetypesRegistry'):
00016     logger.log(severity, msg)
00017 
00018 # directory where template for the ZMI are located
00019 import os.path
00020 _www = os.path.join(os.path.dirname(__file__), 'www')
00021 skins_dir = os.path.join(os.path.dirname(__file__), 'skins')