Re: [Tutor] how to temporarily disable a function

2011-07-28 Thread Christopher King
On Thu, Jul 28, 2011 at 5:08 AM, Peter Otten <__pete...@web.de> wrote: > Pete O'Connell wrote: > > > Hi I was wondering if there is a way to disable a function. > > You could use this decorator: class Disabler(object): def __init__(self, old_function): self.__old = old_function

Re: [Tutor] how to temporarily disable a function

2011-07-28 Thread Peter Otten
Pete O'Connell wrote: > Hi I was wondering if there is a way to disable a function. > Hi have a GUI grid snapping function that I use in a program called Nuke > (the film compositing software) > > Here is the function (which loads when Nuke loads): > ### > def theAutoplaceSnap

Re: [Tutor] how to temporarily disable a function

2011-07-28 Thread Dave Angel
On 07/27/2011 09:58 PM, Pete O'Connell wrote: Hi I was wondering if there is a way to disable a function. Hi have a GUI grid snapping function that I use in a program called Nuke (the film compositing software) Here is the function (which loads when Nuke loads): ### def theAu

Re: [Tutor] how to temporarily disable a function

2011-07-28 Thread Alan Gauld
Pete O'Connell wrote: Hi I was wondering if there is a way to disable a function. Hi have a GUI grid snapping function that I use in a program called Nuke (the film compositing software) simply change the binding of widget to function. Then change it back to re-enable it. You don't say which G

[Tutor] how to temporarily disable a function

2011-07-27 Thread Pete O'Connell
Hi I was wondering if there is a way to disable a function. Hi have a GUI grid snapping function that I use in a program called Nuke (the film compositing software) Here is the function (which loads when Nuke loads): ### def theAutoplaceSnap(): try: nuke.thisNode().