@@ -90,6 +90,7 @@ def _matlab(self):
90
90
self ._validated_plot_settings ["size" ] = tuple (
91
91
self ._matlab .get (0. , "defaultfigureposition" )[0 ][2 :])
92
92
self .handle_plot_settings ()
93
+ return self .__matlab
93
94
94
95
def do_execute_direct (self , code ):
95
96
if pipes :
@@ -248,14 +249,15 @@ def do_shutdown(self, restart):
248
249
249
250
def _execute_async (self , code ):
250
251
try :
251
- with pipes (stdout = _PseudoStream (partial (self .Print , end = "" )),
252
- stderr = _PseudoStream (partial (self .Error , end = "" ))):
252
+ with pipes (stdout = _PseudoStream (partial (self .Print , sep = "" , end = "" )),
253
+ stderr = _PseudoStream (partial (self .Error , sep = "" , end = "" ))):
253
254
kwargs = { 'nargout' : 0 , 'async' : True }
254
255
future = self ._matlab .eval (code , ** kwargs )
255
256
future .result ()
256
257
except (SyntaxError , MatlabExecutionError , KeyboardInterrupt ) as exc :
257
- stdout = exc .args [0 ]
258
- return ExceptionWrapper ("Error" , - 1 , stdout )
258
+ pass
259
+ #stdout = exc.args[0]
260
+ #return ExceptionWrapper("Error", "-1", stdout)
259
261
260
262
def _execute_sync (self , code ):
261
263
out = StringIO ()
@@ -267,7 +269,7 @@ def _execute_sync(self, code):
267
269
except (SyntaxError , MatlabExecutionError ) as exc :
268
270
stdout = exc .args [0 ]
269
271
self .Error (stdout )
270
- return ExceptionWrapper ("Error" , - 1 , stdout )
272
+ return ExceptionWrapper ("Error" , "-1" , stdout )
271
273
stdout = out .getvalue ()
272
274
self .Print (stdout )
273
275
0 commit comments