Open greenarrow opened 14 years ago
This has been shown to be a more general difference in variable scope for code execute by exec(). It looks like higher levels are not looked up to when the variable is not found in the local scope. At present the global statement must be used in all cases.
Imported modules work correctly in the main body of a script but not within a function. Must be due to the way exec operates...
Workaround: Import the module within the function