Re: logging.config.fileConfig FileHandler configure to write to APP_DATA

2012-04-18 Thread Jeffrey Britton
I was sent via email an alternative solution which is working even better for me. In Python code use: class AppFileHandler(logging.FileHandler): def __init__(self, *args): filename, mode = args if not os.path.isabs(filename): filename = os.path.join(os.environ['APPD

Re: logging.config.fileConfig FileHandler configure to write to APP_DATA

2012-04-16 Thread Jeffrey Britton
I figured out what I was after. logfn = os.path.join(os.environ['APPDATA'], directory, filename) ensure_path(logfn) logging.config.fileConfig("logging.conf", defaults={'logfn': logfn}) In the config file use: [handler_fileHandler] class=FileHandler level=DEBUG formatter=simpleFormatter args=(r'%(

Re: logging.config.fileConfig FileHandler configure to write to APP_DATA

2012-04-16 Thread Jeffrey Britton
I figured out a method to enumerate all loggers. root = logging.getLogger() for key in root.manager.loggerDict.keys(): logger = logging.getLogger(key) -- http://mail.python.org/mailman/listinfo/python-list

logging.config.fileConfig FileHandler configure to write to APP_DATA

2012-04-16 Thread Jeffrey Britton
I have a logging configuration file that I load via logging.config.fileConfig. The configuration file, configures a FileHandler to log to file. I wish to initialize the FileHandler to the path os.environ['APP_DATA']. However, I don't know how to configure anything other than a static path. I also

Re: cx_Freeze ImportError, how do I debug this

2012-01-10 Thread Jeffrey Britton
On Jan 10, 8:21 pm, Jeffrey Britton wrote: > I am building a standalone Windows executable using cx_Freeze. > The resulting executable will not run and writes the following error > to the console. > > ImportError: could not import gobject (error was: 'No module named > go

cx_Freeze ImportError, how do I debug this

2012-01-10 Thread Jeffrey Britton
I am building a standalone Windows executable using cx_Freeze. The resulting executable will not run and writes the following error to the console. ImportError: could not import gobject (error was: 'No module named gobject') The project using the gtk libraries for Cairo and Pango on Windows. The