View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013287 | ParaView | (No Category) | public | 2012-06-30 04:59 | 2013-01-10 22:24 | ||||
Reporter | ohyeahq | ||||||||
Assigned To | Sebastien Jourdain | ||||||||
Priority | high | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | 3.14.1 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0013287: Cannot get the script path in python shell | ||||||||
Description | I tried to write a script for paraview - tools - python shell - run script, in which I needed the script directory path to load a vtk file in the same dir. In standard python, sys.path[0] is set to the script path, but in paraview shell it is set to paraview site-packages. os.getcwd() does not work either. There seems no way to get the script path. This is really inconvenient since you need to give the full path of vtk; you can't move 'em to another folder! | ||||||||
Tags | No tags attached. | ||||||||
Project | TBD | ||||||||
Topic Name | 13287_allow_python_script_to_know_their_path_inside_paraview | ||||||||
Type | usability | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0029735) Sebastien Jourdain (manager) 2012-11-16 10:05 |
commit 5a9396c21cb3c54ffa77f73c76cff403caea0926 Author: Sebastien Jourdain <sebastien.jourdain@kitware.com> Date: Fri Nov 16 10:03:58 2012 -0500 Fix 13287: Cannot get the script path in python shell Add "current_script_path" variable that hold the current file path of the executed script. This allow the script to know its own path. Change-Id: I3e899e5d85ed71a436dbbf1f49459e64ad6e215a |
(0029736) Sebastien Jourdain (manager) 2012-11-16 10:06 |
# So the following script will print the path where it is sitting on the HD. print "Script path: ", current_script_path |
(0029758) Kyle Lutz (viewer) 2012-11-20 12:16 |
Merged into ParaView-master (if applicable) |
(0030082) Alan Scott (manager) 2013-01-10 22:24 |
Closing. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2012-06-30 04:59 | ohyeahq | New Issue | |
2012-11-16 10:05 | Sebastien Jourdain | Topic Name | => 13287_allow_python_script_to_know_their_path_inside_paraview |
2012-11-16 10:05 | Sebastien Jourdain | Note Added: 0029735 | |
2012-11-16 10:05 | Sebastien Jourdain | Status | backlog => gatekeeper review |
2012-11-16 10:05 | Sebastien Jourdain | Resolution | open => fixed |
2012-11-16 10:05 | Sebastien Jourdain | Assigned To | => Sebastien Jourdain |
2012-11-16 10:06 | Sebastien Jourdain | Note Added: 0029736 | |
2012-11-20 12:16 | Kyle Lutz | Status | gatekeeper review => customer review |
2012-11-20 12:16 | Kyle Lutz | Note Added: 0029758 | |
2013-01-10 22:24 | Alan Scott | Note Added: 0030082 | |
2013-01-10 22:24 | Alan Scott | Status | customer review => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |