#!/usr/bin/env  python
'''List methods in a python file.'''
# Copyright 2011 Edward Delaporte <edthedev@gmail.com>
# Licensed under the University of Illinois / NCSA Open Source License 
# http://www.opensource.org/licenses/UoI-NCSA 
# Created: 2011-06-27
import re
import sys

# import ClassInspector

# parser = optparse.OptionParser()
# (options, args) = parser.parse_args()

# The hardcore way...
# for arg in args:
# Load the class
# 	if '.py' in arg:
# 		arg = arg.replace('.pyc', '').replace('.py', '')
# 	myclass = __import__(arg) 
##  List its methods.
# 	print ClassInspector.getMethods(myclass)

args = sys.argv[1:]

print args
for arg in args:
  print arg
  f = open(arg, 'r')
  lines = f.readlines()
  f.close()
  for line in lines:
    if 'def' in line:
      print line
