Is it possible to call the deadlinecommand methods etc… directly from within IronPython shell?
I’d like to write a submission script that lives outside of Deadline itself.
The idea is, I’d generate the xx_plugin_info.job and xx_job_info.job files outside of Deadline. So, when I have a hundred or so of .job pair files, I’d like them to get submitted to Deadline. The only way I see is to be able to instantiate (somehow) the deadlinecommand class and call its methods (if it works this way).
I’d simply write a Python script that searches for these .job pairs and supply them to the SubmitDropJob method, generating the proper job ID and the job .xml file along with it in the Repository.
If this isn’t possible, what would you recommend me doing then?
Oh, I was also thinking of writing a .bat batch, but I forgot the syntax long ago and am just much more productive and comfortable in Python. But I suppose, that could also be done.
It would probably just be easier to have your python script call the deadlinecommand process to submit the jobs, OR, write a script that you execute through Deadline by calling “deadlinecommand -executescript myscript.py”. The Deadline functions/classes were only designed to be used in the context of Deadline, so there is some initialization we do behind the scenes that the user doesn’t need to worry about.
Theoretically, you could import the deadline.dll, franticx.dll, etc, libraries as modules into your script, and call functions and use classes directly, but the required initialization wouldn’t be done, so many of the functions simply wouldn’t work. However, I’m sure we could look at exposing the initialization process at some point…
Yeah, I was afraid this wouldn’t be directly possible. But, I’d looked at the Process class and that should be enough for me to start the deadlinecommand process and call the params from within a Python script. We’ll see…