From 29416a643b9c3d19a60b91b37a263d300c11486b Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Sat, 9 Jul 2005 13:03:34 +0000 Subject: python-like dotted module.function syntax reworked outbound message generation (now with symbols instead of one-element anythings) multiply inlets for py (hot and cold inlets) cleaned up float vs. int pyext tags pymeth object for object methods enable built-in functions sequence protocol for symbol type enabled built-in functions py: allow all callables svn path=/trunk/; revision=3310 --- externals/grill/py/pd/builtins-1.pd | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 externals/grill/py/pd/builtins-1.pd (limited to 'externals/grill/py/pd/builtins-1.pd') diff --git a/externals/grill/py/pd/builtins-1.pd b/externals/grill/py/pd/builtins-1.pd new file mode 100644 index 00000000..095e7690 --- /dev/null +++ b/externals/grill/py/pd/builtins-1.pd @@ -0,0 +1,47 @@ +#N canvas 327 349 706 421 12; +#X obj 36 241 py .range @xlate 0; +#X floatatom 35 356 5 0 0 0 - - -; +#X obj 35 323 py .sum; +#X obj 16 13 cnv 15 650 40 empty empty py/pyext 10 22 0 24 -260818 +-1 0; +#X text 235 16 Python script objects \, (C)2003-2005 Thomas Grill; +#X text 235 32 http://grrrr.org/ext; +#X obj 36 159 nbx 5 14 -1e+037 1e+037 0 1 empty empty min 0 -6 0 10 +-262131 -1 -1 38 256; +#X obj 95 159 nbx 5 14 -1e+037 1e+037 0 1 empty empty max 0 -6 0 10 +-262131 -1 -1 100 256; +#X obj 154 159 nbx 5 14 1 100000 1 1 empty empty step 0 -6 0 10 -262131 +-1 -1 1 256; +#N canvas 0 0 462 312 pak3 0; +#X obj 34 26 inlet; +#X obj 81 28 inlet; +#X obj 129 28 inlet; +#X obj 36 158 outlet; +#X obj 36 123 pack 0 0 0; +#X obj 61 78 t b f; +#X obj 108 80 t b f; +#X obj 208 46 loadbang; +#X obj 208 73 1; +#X connect 0 0 4 0; +#X connect 1 0 5 0; +#X connect 2 0 6 0; +#X connect 4 0 3 0; +#X connect 5 0 4 0; +#X connect 5 1 4 1; +#X connect 6 0 4 0; +#X connect 6 1 4 2; +#X connect 7 0 8 0; +#X connect 8 0 4 2; +#X restore 36 195 pd pak3; +#X text 115 240 construct a Python list; +#X text 78 282 Python object pointer is propagated to next object; +#X text 106 320 calculate sum over list elements; +#X text 21 73 Py can use built-in Python functions; +#X text 21 97 A . preceding the function name searches for the function +in either the pyext module or in __builtins__; +#X connect 0 0 2 1; +#X connect 2 0 1 0; +#X connect 6 0 9 0; +#X connect 7 0 9 1; +#X connect 8 0 9 2; +#X connect 9 0 0 1; -- cgit v1.2.1