#NEWLINE# def pyc_file_from_path( path ) : #NEWLINE# #INDENT# 'Given a python source path, locate the .pyc.\n\n    See http://www.python.org/dev/peps/pep-3147/\n                        #detecting-pep-3147-availability\n        http://www.python.org/dev/peps/pep-3147/#file-extension-checks\n\n    ' #NEWLINE# import imp #NEWLINE# has3147 = hasattr ( imp , 'get_tag' ) #NEWLINE# if has3147 : #NEWLINE# #INDENT# return imp . cache_from_source ( path ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return simple_pyc_file_from_path ( path )