Ticket #4612 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Add an importAll method to the ADS in python

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: major Milestone: Release 2.0
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Russell Taylor

Description

When called the method will simply create variables for each of the items in the ADS in the user's current scope.

Change History

comment:1 Changed 9 years ago by Martyn Gigg

Refs #4612. Add importAll to ADS class in python

Adds a variable for each member of the ADS into the current scope.

Changeset: 70b92c34d7b82871738554790a5f56befa28482a

comment:2 Changed 9 years ago by Martyn Gigg

  • Status changed from new to accepted

comment:3 Changed 9 years ago by Martyn Gigg

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

comment:4 Changed 9 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:5 Changed 9 years ago by Russell Taylor

If I have a workspace named "print" then the import gives the message:

Warning: "print" is an invalid identifier, "print" has been imported instead

Do we need to add a line to clean modifying the name if iskeyword() returns True?

comment:6 Changed 9 years ago by Martyn Gigg

Refs #4612. Clean keyword names when importing as Python variables

Changeset: f8f160ca391505cefdfd4e42f4260a442ea026ea

comment:7 Changed 9 years ago by Martyn Gigg

That should prefix the names with an underscore now.

comment:8 Changed 9 years ago by Russell Taylor

  • Status changed from verifying to closed

Looks OK now. I notice that there's no proper autocomplete for the underscore-prefixed variables, but I don't see that as an urgent issue - I'll leave you to create a ticket for it if you think it matters enough.

comment:9 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5459

Note: See TracTickets for help on using tickets.