Code runs in animation but not in regular script

karstenwo's Avatar


02 Nov, 2013 01:35 PM

What is the difference for code being run normally or from the animation draw() function?

I'm fiddling with the CocoaSequenceGrabber based PySight for NodeBox1. The animation, after some 30 errors runs fluently whereas in the adapted iSight grid script, the FrameWork delegate never gets called.

While banging my head against this, I found QTKit based code, which has the same problem.

The final question should be:

How do I define a framework callable delegate that works in non-animation scripts? Do I need to setup a thread?


P.S.: The attached CocoaSequenceGrabber has a reduced framerate. Do NOT replace your existing CocoaSequenceGrabber if you already have it.

P.P.S: I run this in my nodebox fork which is Python 2.7 based but I checked with 1.9.5 which has the same problem.

  1. Support Staff 1 Posted by Frederik De Ble... on 02 Dec, 2013 10:25 AM

    Frederik De Bleser's Avatar

    The only thing I can think of is that the animation is called using a ObjC callback, whereas the code using run is called directly (ie. it blocks). In addition, the _boxedRun function sets some environment variables and sys settings.

    I have no idea how PyObjC does threading behind the screens. We certainly don't do any threading of ourselves for this.

    Sorry I can't help you further but it's been a while since I've looked at this code.

  2. 2 Posted by karstenwo on 02 Dec, 2013 10:38 AM

    karstenwo's Avatar

    Thanks for looking into it.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • 21.2 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

16 May, 2024 02:11 AM
16 May, 2024 01:58 AM
14 May, 2024 01:29 AM
13 May, 2024 12:36 AM
12 May, 2024 07:46 PM


05 May, 2024 04:38 PM
03 May, 2024 06:50 AM
03 May, 2024 12:30 AM
03 May, 2024 12:09 AM
19 Apr, 2024 04:41 AM
16 Apr, 2024 06:18 PM