[shpy-commit] r2892 - shpy/trunk/dist/shpy/net
hpk@codespeak.net
hpk@codespeak.net
Fri, 23 Jan 2004 16:57:29 +0100 (MET)
Author: hpk
Date: Fri Jan 23 16:57:29 2004
New Revision: 2892
Modified:
shpy/trunk/dist/shpy/net/register.py
Log:
make tracebacks for executing input cells somewhat nicer ...
Modified: shpy/trunk/dist/shpy/net/register.py
==============================================================================
--- shpy/trunk/dist/shpy/net/register.py (original)
+++ shpy/trunk/dist/shpy/net/register.py Fri Jan 23 16:57:29 2004
@@ -8,8 +8,10 @@
class InstallableGateway(gateway.Gateway):
def __init__(self, addr, ns = None):
io = inputoutput.connect(addr)
- source = [inspect.getsource(inputoutput),
+ source = [inspect.getsource(dyncode),
+ 'installhacks()',
inspect.getsource(gateway),
+ inspect.getsource(inputoutput),
'directionflag = "<"',
]
source.append(io.server_stmt)
@@ -70,7 +72,7 @@
buffer = StringIO.StringIO()
sys.stdout = sys.stderr = buffer
try:
- exec compile(%(sourcecode)r, '<remote stdin>', 'single') in execns
+ exec makecode(%(sourcecode)r, 'single') in execns
except:
import traceback
traceback.print_exc()