Code completion


#1

I’m using Komodo Edit and I’m trying to get code completion working for the Deadline Python API. I’ve copied the Deadline directory in DeadlineRepository7\api\python into my C:\Python27\Lib\site-packages directory. But I can’t get the correct libraries to come up when I import Deadline. I’m sure I’m doing things wrong. SO maybe one of the devs can help me out.

Thanks!

James


#2

I’ve never used Komodo Edit. Bear in mind, that our “Standalone Python API” is NOT the same as our built-in Scripting API (which I believe your other thread discusses pools/groups). It really depends on how you will be wanting to execute/access Deadline in code. The Scripting API will be via a Python script executed within the Deadline environment such as Monitor but could also be via “DeadlineCommand.exe -ExecuteScript //path/to/python_script.py”. An alternative is via Pulse/WebService and our RESTful HTTP web service and our Python wrapper API around this (which is the py files located in your repo/api/python). So, code completion of the Standalone Python API commands won’t help you for any Scripting API work in your IDE of choice.

So, our built-in Scripting API is here:
docs.thinkboxsoftware.com/produc … Reference/

Our RESTful HTTP API is here:
docs.thinkboxsoftware.com/produc … rview.html

And our Standalone Python wrapper API is here:
docs.thinkboxsoftware.com/produc … Reference/

You can also execute lots of different commands via the DeadlineCommand.exe.

I should note that the first API - Scripting API is the most feature rich.


#3

Thanks Mike. For my Pools script I will be mainly be using a Monitor script. So the Scripting API will be it. But I am planning on writing a custom tool to submit Maya caching jobs that will most likely utilize the command line stuff.

So I guess what I need is the pathing for those libraries so I can include them in my Komodo python path.

I also bring up Komodo just because that’s what I use. I’ve actually had a lot of trouble with other Python libraries and code completion in Komodo. If you have any suggestions for other code editors I’d love to hear them. :slight_smile:

James


#4

There currently isn’t a way to ‘get’ at the Scripting API functions for insertion as code-completion in an IDE. It’s one of those things, which would be nice to add at some point, but more important requests always come along!

Sublime Text IDE is my personal weapon of choice as it’s faster than a fully blown VS IDE for Python dev. Sublime provides auto code-completion for everything in the currently open py file, which is handy unless you have a blank file. :wink: The Python IDE market is quite fragmented, everyone has an opinion.

dbader.org/blog/setting-up-subl … evelopment

What we need is more Deadline scripting power users to +1 these type of features to get them promoted up the ever-increasing wishlist. Who knows, maybe something crazy might happen one day, like a Deadline Script Editor in the Monitor!


#5

Yes please!!

But code completion would go a long way in upping my Deadline Python game. Just show me where to +1.

Thanks for the suggestion BTW, I’m going to check out Sublime now. :smiley:


#6

Deadline developers making their own lives easier? Impossible!


#7

:laughing:


#8

+++1!


#9

Thanks for the feedback / +1’s guys. Obviously if there are any other users/studios that feel at least code completion to better still, a Deadline Script Editor would be super useful, then please do add your thoughts to this forum thread, as it will strengthen the case more so!


#10

A script editor would be great (I know I’ve requested it before), especially for doing one-off farm rescue/batch operations.

As far as code completion goes, I don’t think it would be much to be gained over just reading the API documentation, but that’s me looking at things as a developer. I guess it would probably be pretty trivial for you guys to generate some stub Python packages at build time though.


#11

+1


#12

We are currently discussing this internally. :wink:


#13

+1

Still an interesting topic. Any updates?


#14

Cool. Thanks for your vote, which all helps to raise its priority of possibly becoming a reality.


#15

Yes, please provide stubs for both the scripting api and the stand alone api.


#16

Oh man, I’d love this! Big +1 from me.


#17

I’m setting up a new coding environment and trying to establish code completion again. So I figured I’d circle around to this thread again and ask if there is any news on this front? I see there is plenty of interest in it. :smiley:


#18

@JustinB: You worked here, you can’t vote.

(+1 from me too. :smiley:)


#19

An internal editor would be nice. But something similar to what the Modo devs did to provide code completion would be great too. I’m just curious if this is possible with the Deadline libraries.

sdk.luxology.com/wiki/Code_Completion_for_IDEs


#20

Just bumping this thread.
This would always be great to have…