i put this together to save on typing, hope it helps people
(saves on lots of typing)

def myProc(**args):
    usrName = parseArgs(args, 'name', 'n', 'test')
    usrData = parseArgs(args, 'data', 'd', 'testB')
    print usrName
    print usrData

def parseArgs(args, a, b, default):
    for i in args:
        if i == a or i == b:
            default = args[i]
    return default

example
myProc(n = 'not default')

thanks again nicolas for the insight

>
> oups perhaps you must use:
> ... **keys.keys()
> as the ** collect all the undefind args in the procedure call in a dict...
>
> >
>



--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to