Ticket #4612 (closed: fixed)
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: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: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.
Refs #4612. Add importAll to ADS class in python
Adds a variable for each member of the ADS into the current scope.