arokem / python-matlab-bridge

A simple Python => MATLAB(R) interface and a matlab_magic for ipython
BSD 2-Clause "Simplified" License
335 stars 96 forks source link

stdout not returned if stderr is populated by matlab #240

Open brunobeltran opened 8 years ago

brunobeltran commented 8 years ago
m = pymatbridge.Matlab()
m.start()
m.run_code("""for i=1:10; disp(i); if i==5; error('a'); end; end;""")

returns only

{'content': {'stdout': 'a'}, 'result': '', 'success': False}

When it should return something like

{'content': {'stderr': 'a', 'stdout': '1\n2\n3\n4\n5\na'}, 'result': '', 'success': False}