diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2002-12-02 19:36:35 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2002-12-02 19:36:35 +0000 |
commit | 1242ecdbfafd008263f0cca418c10dc1322ff21f (patch) | |
tree | 657a90e8d83af95f6fe876d2ec296603b08b26b7 /externals/grill/py/scripts/tcltk.py | |
parent | 9815096db22c73cacdbb65512d1b61d633db7fa8 (diff) |
""
svn path=/trunk/; revision=268
Diffstat (limited to 'externals/grill/py/scripts/tcltk.py')
-rw-r--r-- | externals/grill/py/scripts/tcltk.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/externals/grill/py/scripts/tcltk.py b/externals/grill/py/scripts/tcltk.py index 154a51b1..04828a25 100644 --- a/externals/grill/py/scripts/tcltk.py +++ b/externals/grill/py/scripts/tcltk.py @@ -7,7 +7,11 @@ """This is an example script for showing a nonsense tcl/tk application.""" -import pyext +try: + import pyext +except: + print "ERROR: This script must be loaded by the PD/Max pyext external" + from Tkinter import * import random @@ -40,7 +44,7 @@ class Application(Frame): r = self.mcanv.create_rectangle(50,50,200,200) self.mcanv.addtag_withtag('group',r) - for i in range(500): + for i in xrange(500): x = random.uniform(50,200) y = random.uniform(50,200) l = self.mcanv.create_line(x,y,x+1,y) |