Importing Python Libraries

Hi, this is more of a python related question, but I was hoping someone would know the answer. I want to use file operations such as “move” “copy” “rename” etc. that are found in the shutil library and maybe even the os library. But I am not sure how to import these libraries or bypass importing them to find a way of using the aforesaid file operations. Any suggestions or solutions? Thanks very much.

Because Deadline uses IronPython, not all standard python modules can be loaded (like ‘os’). This issue will be addressed in 5.1, because we’re also including native python support in that version.

In the meantime, you can make use of .NET calls to do this. First you just need to import from File.IO:

from File.IO import *

Then you can use the File.Copy and File.Move functions:
msdn.microsoft.com/en-us/library/9706cfs5.aspx
msdn.microsoft.com/en-us/library … .move.aspx

Hope that helps!

  • Ryan