From 1242ecdbfafd008263f0cca418c10dc1322ff21f Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 2 Dec 2002 19:36:35 +0000 Subject: "" svn path=/trunk/; revision=268 --- externals/grill/py/scripts/threads.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'externals/grill/py/scripts/threads.py') diff --git a/externals/grill/py/scripts/threads.py b/externals/grill/py/scripts/threads.py index f7740bd3..ec0488d7 100644 --- a/externals/grill/py/scripts/threads.py +++ b/externals/grill/py/scripts/threads.py @@ -16,7 +16,11 @@ For threading support pyext exposes several function and variables """ -import pyext +try: + import pyext +except: + print "ERROR: This script must be loaded by the PD/Max pyext external" + from time import sleep ################################################################# @@ -33,7 +37,7 @@ class ex1(pyext._class): # method for bang to any inlet def bang_(self,n): - for i in range(self.loops): + for i in xrange(self.loops): # if _shouldexit is true, the thread ought to stop if self._shouldexit: break -- cgit v1.2.1