ce, and for the
stream that i choose.
(I failed to find a "maximum level" for the handlers in the logging module).
Thanks in advanced
Dotan Barak
--
http://mail.python.org/mailman/listinfo/python-list
A simple expression is enough to write to files, for example.
Try this expression in Python 3.0:
[x for x in ().__class__.__base__.__subclasses__() if x.__name__ ==
'_FileIO'][0]('hello.txt', 'w').write('Hello, World!')
To explain, "().__class__.__base__.__subclasses__()" gives you a li
On 25/12/2009 19:27, Gary Herron wrote:
Dotan Barak wrote:
Recover the exception, and examine the tuple of args or the message
string.
>>> try:
... eval("my_number < 10", {"__builtins__":None}, {})
... except NameError,e:
... print e.args
...
Hi.
I'm trying to evaluate a string and getting a NameError
(it is expected, since the variable my_number wasn't provided in the
"locals" dictionary).
<--snip start-->
>>> eval("my_number < 10", {"__builtins__":None}, {})
Traceback (most recent call last):
File "", line 1, in ?
File "", li