[code.view]

[top] / python / PyMOTW / pyclbr / pyclbr_readmodule_ex.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2009 Doug Hellmann All rights reserved.
     #
     """
     """
     #end_pymotw_header
     import pyclbr
     import os
     from operator import itemgetter
     
     example_data = pyclbr.readmodule_ex('pyclbr_example')
     
     for name, data in sorted(example_data.items(), key=lambda x:x[1].lineno):
         if isinstance(data, pyclbr.Function):
             print 'Function: {0} [{1}]'.format(name, data.lineno)
     
     

[top] / python / PyMOTW / pyclbr / pyclbr_readmodule_ex.py

contact | logmethods.com