#! /usr/bin/env python2

import sys
import pdb
import inspect

def function():
  pass

function_type = type(function)

def threeRequiredParameters(a, b, c):
  pass

def twoRequiredParametersOneOptional(a, b, c=None):
  pass

def dynamic(*varlist, **vardict):
  pass

def combo(a, b, c=None, *varlist, **vardict):
  pass

class A(object):
  def foo(a):
    pass
main = sys.modules[__name__]
for attrName in dir(main):
  attr = getattr(main, attrName)
  if (type(attr) == function_type) and (attr != function):
    print attrName, '|', inspect.getargspec(attr)

a = A()
attr = getattr(a, 'foo')
print 'a.foo', '|', inspect.getargspec(attr)
