AWS Thinkbox Discussion Forums

scripting workflow with deadline

I’m curious how you guys normally work when scripting deadline scripts. Normally, with maya for example, if i run the associated python executable, i can import the libraries of the host application. For example:

C:\Program Files\Autodesk\Maya2012\bin>mayapy.exe
Python 2.6.4 (r264:75706, Apr 14 2010, 12:23:05) [MSC v.1500 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.

from maya import cmds

Or with nuke, i can start the application, go to a script window, and start experimenting, prototyping the script.

But with deadline, i have neither option:

C:\Program Files\Thinkbox\Deadline6\bin>dpython.exe
Python 2.6.7 (r267:88850, Jun 21 2011, 13:39:32) [MSC v.1500 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.

from Deadline.Scripting import *
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named Deadline.Scripting

And there is no application to run with a script editor.

My only way to even get a directory listing of methods/properties is to write a script, then submit it with a job and have it pick up by a slave, then look at the output, with lots of prints. Its very slow and cumbersome, and i imagine that’s not the way you guys are developing. There is no documentation with up to date property/method lists, so its a challenge just to even know what options i have.

Can you give me any pointers?

cheers,
laszlo

Hey Lazslo,

I usually test this kind of stuff by writing the script in an IDE, and then running it through DeadlineCommand’s ExecuteScript command, which will let you import all the Deadline modules. Unfortunately, this won’t let you do an interactive shell, obviously, but I just have my IDE set up to use “deadlinecommand -executescript <script_name>” as the command to run python scripts. This lets me write a couple lines in the editor, hit F5, and get the results.

The Scripting Reference doc should be pretty comprehensive in that regard, and the 6.0 one should largely apply to 6.1. As for 6.1-specific stuff, it’s probably easier to just post on the forums (as you’ve been doing) and we can answer any questions you might have for the new stuff, until we finalize our docs.

Hope this helps!

Cheers,

  • Jon

Cool thanks Jon, that’s exactly the info i was looking for!

Yeah i was looking for 6.1 specific stuff (the new dependency handling specifically).

FYI.
I’ve been working on something to potentially solve a lot of these issues…
Hopefully more info soon :slight_smile:

Such a tease! Can’t wait to see what you have cookin’ :slight_smile:

Just a quick update. I’m looking at a VS VSIX template which contains a solution of 1 or more projects, which references dpython.exe and adds in the search path and also, the various paths to scripts in a standard Deadline repository. Then, with PTVS installed in either 2010 or newer, you get intellisense, call stack, lots of toys to play with, all within the Deadline executing environment. The one thing I can’t easily solve without pure hard labour, is generating (parsing) out all the API methods that are available both via deadlinecommand.exe and also via the Deadline Scripting API. ~ would need some assistance to make this a reality…

Privacy | Site terms | Cookie preferences