[pypy-svn] r5026 - pypy/trunk/src/pypy/tool/tb_server
arigo at codespeak.net
arigo at codespeak.net
Thu Jun 10 14:46:47 CEST 2004
Author: arigo
Date: Thu Jun 10 14:46:46 2004
New Revision: 5026
Modified:
pypy/trunk/src/pypy/tool/tb_server/__init__.py
Log:
Lazily import the tb_server package's content (so don't import HTTP stuff
unless it is really needed).
Modified: pypy/trunk/src/pypy/tool/tb_server/__init__.py
==============================================================================
--- pypy/trunk/src/pypy/tool/tb_server/__init__.py (original)
+++ pypy/trunk/src/pypy/tool/tb_server/__init__.py Thu Jun 10 14:46:46 2004
@@ -1 +1,15 @@
-from server import start, stop, publish_exc, wait_until_interrupt
+# Lazy import
+
+def start():
+ global start, stop, publish_exc, wait_until_interrupt
+ from server import start, stop, publish_exc, wait_until_interrupt
+ return start()
+
+def stop():
+ pass
+
+def wait_until_interrupt():
+ pass
+
+def publish_exc(exc):
+ pass
More information about the Pypy-commit
mailing list