Search - User list
Full Version: PDG_TEMP or workaround
Root » PDG/TOPs » PDG_TEMP or workaround
Johan Boekhoven
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
chrisgreb
__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

work_item.node.scheduler.localizePath('__PDG_TEMP__')
# Or
work_item.node.scheduler.tempDir(True)
Johan Boekhoven
Thanks Chris,

This works for my needs thanks!
I think a lot of us would be very greatful with a lot more example files and documentation.
I know it's such a broad scope, but some more use cases would be great!

Again thanks!
-Johan
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB