Hi All,
I need to create temp batch files for a very particular problem (can't use any of the python process or os defs to substitute for the batch files).
So I wanted to store the batchfiles in PDG_TEMP, and write it's path to an attribute, but whatever I try it won't unpack $PDG_TEMP, __PDG_ETMP__ or os.environ to a path I can use to store the batch file.
I use a python processor to build the batch files.
Is there some limitation on how to read the TEMP dir? Is there a workaround, am I using the wrong nodes?
Thanks!
-Johan
PDG_TEMP or workaround
1398 2 2- Johan Boekhoven
- Member
- 72 posts
- Joined:
- Offline
- chrisgreb
- Member
- 603 posts
- Joined: Sept. 2016
- Offline
__PDG_TEMP__ is only really used for commands on jobs that run out of process where the $PDG_TEMP environment variable is automatically defined.
If you want to use it in-process, you'll have to use the scheduler python API
If you want to use it in-process, you'll have to use the scheduler python API
work_item.node.scheduler.localizePath('__PDG_TEMP__') # Or work_item.node.scheduler.tempDir(True)
- Johan Boekhoven
- Member
- 72 posts
- Joined:
- Offline
-
- Quick Links