Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Zeds way (look in the lamson source: it is in lamson.args and well documented) gives you a bi more freedom.

So it passes out any options it finds by default and lets you decide what to do with it - you only have to call a function if you want to set a default.

It lets you run args.parse_and_run_command to directly run a function and pass it the cmdline options as a dict.

It's all very handy and is totally compatible with previous cmdline structures!

I think it's a neat option & hopefully someone will convince Guido to have it in Python core in the future :) (doubt it though)

Grab the lamson source and dig it out to get a better idea.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: