how to enable error message in exec??
ed_tsang at yahoo.com
ed_tsang at yahoo.com
Sun Apr 8 13:00:13 EDT 2001
Hi
My current script, say script A, need to execute some python code in
other file, say script B, by using exec() function. But if there is
any syntax error in script B, the exec() returns, but I would not
know what kind of syntax error is that. How can I enable this kind of
execution gives the same level of error reporting capability as if
the python code is run thorugh in the same file?
Code fragment:
execCmd = "guiCb.pixitObj." + eventHandler[0]
exec(execCmd)
where execCmd is just a string containing the full execution python
code. eventHandler[0] is a python code read from script B.
Thanks
More information about the Python-list
mailing list