diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2002-10-22 23:16:30 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2002-10-22 23:16:30 +0000 |
commit | c2645dc4003b1391aba9b387a79a66cff1e63d3e (patch) | |
tree | 1ea6dccb8011a8ff64efb7c2ecf9a22caad860b3 /externals/grill/py/scripts/script.py | |
parent | d62e56f4df9594f72ce501f5e19c974fd18e7295 (diff) |
This commit was generated by cvs2svn to compensate for changes in r189,
which included commits to RCS files with non-trunk default branches.
svn path=/trunk/; revision=190
Diffstat (limited to 'externals/grill/py/scripts/script.py')
-rw-r--r-- | externals/grill/py/scripts/script.py | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/externals/grill/py/scripts/script.py b/externals/grill/py/scripts/script.py new file mode 100644 index 00000000..4796949c --- /dev/null +++ b/externals/grill/py/scripts/script.py @@ -0,0 +1,53 @@ +# py/pyext - python script objects for PD and MaxMSP +# +# Copyright (c) 2002 Thomas Grill (xovo@gmx.net) +# For information on usage and redistribution, and for a DISCLAIMER OF ALL +# WARRANTIES, see the file, "license.txt," in this distribution. +# + +"""Several functions to show the py script functionality""" + +import sys + +print "Script initialized" + +try: + print "Script arguments: ",sys.argv +except: + print + +def numargs(*args): # variable argument list + """Return the number of arguments""" + return len(args) + +def strlen(arg): + """Return the string length""" + return len(arg) + + +def strcat(*args): + """Concatenate several symbols""" + s = "" + for si in args: + s += str(si) + return s + + +def addall(*args): # variable argument list + s = 0 + for si in args: + s += si + return s + + +def ret1(): + return 1,2,3,4 + + +def ret2(): + return "sd","lk","ki" + + +def ret3(): + return ["sd","lk","ki"] + |