As long as you can import the file, you can inspect it; it doesn't matter whether it comes from a .py or .pyc.
>>> import getopt
>>> dir(getopt)
['GetoptError', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'do_longs', 'do_shorts', 'error', 'getopt', 'gnu_getopt', 'long_has_args', 'os', 'short_has_arg']
>>> type(getopt.getopt)
<type 'function'>
>>> inspect.getargspec(getopt.getopt)
ArgSpec(args=['args', 'shortopts', 'longopts'], varargs=None, keywords=None, defaults=([],))
>>> help(getopt.getopt)
Help on function getopt in module getopt:
...