Nvizible/NukeExternalControl — Issue #5: Confusion in usage of NukeCommandManager()
Author: HughMacdonald
Created: 2011-11-02 19:13:07+00:00
State: open

This is one for the Luma guys...

I find that the way that NukeCommandManager() is used in a with statement to be slightly confusing...

with NukeCommandManager() as conn:
nuke = conn.nuke

This implies to me that *conn* is the NukeCommandManager object, which it isn't (as __enter__ returns the connection)

I don't want to change any of the workings of this - just how things are internally.

I'm wondering about maybe making NukeCommandManager be a subclass of NukeConnection that deals with entering an exiting, and starting the server from it. That way, *conn* would actually be a NukeCommandManager instance, with all the functionality of a NukeConnection object.

Thoughts?