Ticket #1415 (assigned defect)

Opened 7 weeks ago

Last modified 45 hours ago

Python import statement from MantidPlot broken

Reported by: Mathieu Doucet Owned by: Martyn Gigg
Priority: major Milestone: Iteration 25
Keywords: Cc:
Tester:

Description

I noticed that importing python modules that live in another file doesn't always work when the importing code is executed within MantidPlot.

I will commit example code and refer to this ticket.

Change History

Changed 7 weeks ago by Mathieu Doucet

(In [5299]) Example python code that should work within MantidPlot. Re #1415

Changed 7 weeks ago by Mathieu Doucet

Run execute_test.py in the changeset 5299 (above). It works within vanilla python, but doesn't within MantidPlot. This was tested both under Ubuntu 10 and Mac OS X v10.6.

Changed 7 weeks ago by Mathieu Doucet

Note that you have to move the two files above elsewhere on your file system to see the problem. The problem is that the user expects the directory containing a loaded python script to be added to the python path. As it is, the two example files are already on the python path.

Changed 7 weeks ago by Mathieu Doucet

(In [5312]) Now that we know what the problem is we don't need those examples. Adding the file directory to the python path when loading from MantidPlot seems like the solution. Re #1415

Changed 45 hours ago by Nick Draper

  • owner set to Martyn Gigg
  • status changed from new to assigned
Note: See TracTickets for help on using tickets.