Mauro Navarro Baraldi <mauro.bara...@gmail.com> added the comment:

Reviewing this thread and talking with another friends, I thought that the 
pythonic way to solve it should be use the tempfile module.

And here is a suggestion using the logging module with tempfile.

> import logging
> import tempfile
> fp, LOG_FILENAME = tempfile.mkstemp(suffix=".log")
> logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG)
> logging.debug('This message should go to the log file')
> LOG_FILENAME
'/tmp/tmprBhZz1.log'

----------
components: +Demos and Tools -Documentation

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8890>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to