Source

rope_py3k / rope / base / oi / runmod.py

Diff from to

rope/base/oi/runmod.py

         def __init__(self, port):
             s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
             s.connect(('127.0.0.1', port))
-            self.my_file = s.makefile('w')
+            self.my_file = s.makefile('wb')
 
         def send_data(self, data):
             if not self.my_file.closed:
         data_sender = _FunctionCallDataSender(send_info, project_root)
     del sys.argv[1:4]
     with open(file_to_run) as file:
-        exec(file.read(), run_globals)
+        exec(compile(file.read(), file_to_run, 'exec'), run_globals)
     if send_info != '-':
         data_sender.close()