Update of /cvsroot/webware/Webware/WebKit
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv306
Modified Files:
ImportSpy.py
Log Message:
Applied fix to recognize .pyo files.
Index: ImportSpy.py
===================================================================
RCS file: /cvsroot/webware/Webware/WebKit/ImportSpy.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ImportSpy.py 28 Mar 2003 00:14:02 -0000 1.6
--- ImportSpy.py 4 Feb 2004 23:56:59 -0000 1.7
***************
*** 9,12 ****
--- 9,18 ----
to poll sys.modules, then we don't need this fanciness.
+ jdh: I'm not sure. The original implementation from Tavis used sys.modules
+ like you say. I implemented this to avoid having any polling at all,
+ but perhaps it's not worth it. I'm not sure if there were other
+ factors in the design which pointed to this solution.
+
+
This module helps save the filepath of every module which is imported.
This is used by the `AutoReloadingAppServer` (see doc strings for more
***************
*** 135,139 ****
elif f and f not in fileList.keys():
# record the .py file corresponding to each '.pyc'
! if f[-4:] == '.pyc':
f = f[:-1]
try:
--- 141,145 ----
elif f and f not in fileList.keys():
# record the .py file corresponding to each '.pyc'
! if f[-4:].lower() in ['.pyc', '.pyo']:
f = f[:-1]
try:
|