[shpy-commit] r2885 - shpy/trunk/dist/shpy/net

arigo@codespeak.net arigo@codespeak.net
Fri, 23 Jan 2004 15:30:50 +0100 (MET)


Author: arigo
Date: Fri Jan 23 15:30:50 2004
New Revision: 2885

Modified:
   shpy/trunk/dist/shpy/net/shell.py
Log:
fixed shell to work with the new non-pickle protocol :-)



Modified: shpy/trunk/dist/shpy/net/shell.py
==============================================================================
--- shpy/trunk/dist/shpy/net/shell.py	(original)
+++ shpy/trunk/dist/shpy/net/shell.py	Fri Jan 23 15:30:50 2004
@@ -3,7 +3,7 @@
 
 for injection into server_unpickle.py 
 """
-import sys, os, socket, select, pickle
+import sys, os, socket, select
 
 try:
     clientsock 
@@ -15,9 +15,7 @@
     myself = open(os.path.abspath(sys.argv[0])).read()
     sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     sock.connect((host, port))
-    sockfile = sock.makefile('w+',0)
-    p = pickle.Pickler(sockfile)
-    p.dump(myself) 
+    sock.sendall(repr(myself)+'\n')
     print "send boot string"
     inputlist = [ sock, sys.stdin ]
     try: