Ticket #913 (closed: fixed)

Opened 11 years ago

Last modified 5 years ago

Pasting code from external editor into Python scripting causes syntax errors

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: major Milestone: Iteration 20
Component: Keywords:
Cc: Blocked By:
Blocking: Tester:

Description

On windows each line ending has an additional '\r' over the unix one. Python struggles with code that contains a mixture of line ending characters. When opening a file, '\r' characters are removed from the stream but these are being imported with a paste command.

To reproduce:

  • Copy some code from an external editor on Windows;
  • Go to the end of a line and press return;
  • Execute the code. A syntax error should occur

The workaround for now is to save and reload the file.

Change History

comment:1 Changed 11 years ago by Nick Draper

  • Owner set to Martyn Gigg

comment:2 Changed 11 years ago by Martyn Gigg

  • Status changed from new to closed
  • Resolution set to fixed

(In [3238]) Fixed code pasting in MantidPlot Python window. Fixes #913

comment:3 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 1761

Note: See TracTickets for help on using tickets.