[livecoding] r134 committed - - namespace.py: In UPDATE mode, modules are now copied over from the n...

2 views
Skip to first unread message

livec...@googlecode.com

unread,
Feb 12, 2010, 7:35:00 PM2/12/10
to py-livecod...@googlegroups.com
Revision: 134
Author: richard.m.tew
Date: Fri Feb 12 16:33:52 2010
Log: - namespace.py: In UPDATE mode, modules are now copied over from the
new code to the old code. What is copied over is still problematic, but
this is more useful. Further work needed.
- namespace.py: The script directory dependency resolution now exits if
only one script is left. This prevents it from doing the full set of
attempts, when there is no difference between each attempt. It could be
made slightly more optimal yet, but the benefits are few.
http://code.google.com/p/livecoding/source/detail?r=134

Modified:
/trunk/namespace.py

=======================================
--- /trunk/namespace.py Fri Jan 29 00:54:33 2010
+++ /trunk/namespace.py Fri Feb 12 16:33:52 2010
@@ -140,8 +140,8 @@

valueType = type(v)
# Modules will have been imported from elsewhere.
- if isinstance(v, types.ModuleType):
- continue
+ #if isinstance(v, types.ModuleType):
+ # continue

if valueType in (types.ClassType, types.TypeType):
# Classes with valid modules will have been imported from
elsewhere.
@@ -202,6 +202,9 @@
while len(scriptFilesToLoad) and attemptsLeft > 0:
logger.debug("ScriptDirectory.Load dependency resolution
attempts left %d", attemptsLeft)

+ if len(scriptFilesToLoad) == 1:
+ attemptsLeft = 1
+
scriptFilesLoaded = set()
for scriptFile in scriptFilesToLoad:
if self.RunScript(scriptFile):

Reply all
Reply to author
Forward
0 new messages