changeset 901:a88c1746b068

copy the fct record_version from LeDeepNet
author Frederic Bastien <nouiz@nouiz.org>
date Wed, 24 Feb 2010 13:55:33 -0500
parents f36d68b65f2c
children e966d5ab8103
files pylearn/version.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/version.py	Wed Feb 24 13:36:01 2010 -0500
+++ b/pylearn/version.py	Wed Feb 24 13:55:33 2010 -0500
@@ -6,6 +6,10 @@
 
 _cache = dict()
 
+def record_versions(results, modules, prefix='version_'):
+    for module in modules:
+        setattr(results, prefix+module.__name__, import_id(module.__name__))
+
 def src_version(module_name):
     """Return compact identifier of module code.