julik/projectionist — pull request #1 by dbr (2012-06-28 18:43:09+00:00)
Title: Menu setup stuff

You can just do:

def thing():
nuke.message("\\o/")

m_node = nuke.menu("Node")
m_node.addCommand("Thing", thing)

..which means you don't have to worry about absolute paths and such (and it works even if the callable isn't directly importable, like in the script editor etc)