>>> import inspect
>>> def foo(bar, buz):
... pass
...
>>> inspect.getargspec(foo)
ArgSpec(args=['bar', 'buz'], varargs=None, keywords=None, defaults=None)
>>> def magical_way(func):
... return inspect.getargspec(func).args
...
>>> magical_way(foo)
['bar', 'buz']