Ticket #1493 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

Python interpreter within MantidPlot doesn't behave properly on Mac

Reported by: Mathieu Doucet Owned by: Martyn Gigg
Priority: critical Milestone: Iteration 25
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Steve Williams

Description

The behavior of the python editor in MantidPlot doesn't behave properly on Mac. Simple scripts that work on Linux won't execute on Mac. For example, the following two lines won't execute:

import sys print "got it"

After executing this, one gets "SyntaxError on line 1: "invalid syntax". When adding a comment line before the import statement, the script completes "successfully", but the message is never printed. Clearly there's something wrong here. The error reporting is also not behaving the same as on Linux.

Change History

comment:1 Changed 10 years ago by Mathieu Doucet

  • Priority changed from major to critical

comment:2 Changed 10 years ago by Nick Draper

  • Owner set to Martyn Gigg
  • Status changed from new to assigned

comment:3 Changed 10 years ago by Mathieu Doucet

For a real example, go here and copy and paste the example script in the python editor in MantidPlot. It works fine on Windows and Linux, but not on Mac.

comment:4 Changed 10 years ago by Martyn Gigg

(In [6048]) Fix the Python interpreter window on the Mac. The problem was with the line endings only containing '\r' which were removed by the MantidPlot code (it has always done this). Now it normalises the line endings correctly before sending the code to Python. Re #1493

comment:5 Changed 10 years ago by Martyn Gigg

  • Status changed from assigned to accepted

comment:6 Changed 10 years ago by Martyn Gigg

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:7 Changed 10 years ago by Anders Markvardsen

  • Status changed from verify to verifying
  • Component set to Mantid
  • Tester set to Anders Markvardsen

comment:8 Changed 10 years ago by Anders Markvardsen

  • Status changed from verifying to verify
  • Tester Anders Markvardsen deleted

It would be more appropriate for someone with a Mac to test this ticket

comment:9 Changed 10 years ago by Steve Williams

  • Status changed from verify to verifying
  • Tester set to Steve Williams

comment:10 Changed 10 years ago by Steve Williams

  • Status changed from verifying to closed

Both the Python script and immediate window work

comment:11 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2340

Note: See TracTickets for help on using tickets.