From: Kevin A. <ka...@us...> - 2004-04-26 20:56:06
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11090 Modified Files: resource.py Log Message: changed __import__ to use globals() instead of locals() for the 2nd arg to remove the psyco warning per Armin Rigo's suggestion Index: resource.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/resource.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** resource.py 17 Apr 2004 14:22:26 -0000 1.4 --- resource.py 26 Apr 2004 20:55:56 -0000 1.5 *************** *** 20,28 **** try: #exec("from appcomponents import " + moduleName) ! __import__(APP_COMPONENTS_PACKAGE + '.' + moduleName, globals(), locals(), [APP_COMPONENTS_PACKAGE]) except ImportError, e: try: #exec("from components import " + moduleName) ! __import__(COMPONENTS_PACKAGE + '.' + moduleName, globals(), locals(), [COMPONENTS_PACKAGE]) except ImportError, e: log.error(e) --- 20,28 ---- try: #exec("from appcomponents import " + moduleName) ! __import__(APP_COMPONENTS_PACKAGE + '.' + moduleName, globals(), globals(), [APP_COMPONENTS_PACKAGE]) except ImportError, e: try: #exec("from components import " + moduleName) ! __import__(COMPONENTS_PACKAGE + '.' + moduleName, globals(), globals(), [COMPONENTS_PACKAGE]) except ImportError, e: log.error(e) |