|
Good point Nathan.
Magno.
`reload()` can definitely be useful, but keep in mind that it does not
re-bind external references to a module. If moduleA imports moduleB, running
`reload(moduleB)` will not update moduleA’s reference to it, so any calls
moduleA makes to objects in moduleB will still be using old code. In order to
update moduleA’s reference, you would need to reload it explicitly:
`reload(moduleA.moduleB)`.
-Nathan
Sent: Thursday, August 08, 2013 11:55 AM
Subject: Re: [Nuke-users] sublime text
Something that I use here when coding/testing my python scripts is the
python reload() function. It will always import the latest modification saved to
your script file.
No need to copy/pasteback and forth and if you want you can even assign
this to a keyboard shortcut.
Something like this would work on the script editor:
nuke.pluginAddPath('/path/to/script/folder/') # need to run this just
1 time.
import yourscriptfile #need to run this just 1 time.
reload(yourscriptfile)
yourscriptfile.runthedesiredfunctionhere()
Ah, many thanks!
Will look into this.
// Fredrik
--
Magno Borgo Certified Nuke
Trainer www.boundaryvfx.com www.borgo.tv Brasil:Curitiba:GMT=
-3
_______________________________________________ Nuke-users mailing
list [email protected],
http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
-- Magno Borgo Certified Nuke Trainer www.boundaryvfx.com www.borgo.tv Brasil:Curitiba:GMT= -3 |
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users