Compiling and running a flat Python file with args & keywds

martin z pxtl at hotmail.com
Fri May 30 18:15:59 EDT 2003


> It would be helpful to see an example or two of the source
> sort-of-code, with headers and a run-through of what you'd like to
> have happen.

------------------------------
Header (not in the python file):
arg xpos
arg ypos
arg zpos
keywd mass
keywd speed
keywd size

------------------
In the python file:
SetPos(xpos,ypos,zpos)
if mass
    SetMass(mass)
if speed
    SetSpeed(speed)
---------------------

size is never used, or even mentioned.  Currently, the arguments and
keywords are parsed together into one dictionary and passed in as locals,
and all the functions used are stored in the globals.  Still, this is less
than top optimizing.






More information about the Python-list mailing list