#NEWLINE# def getVersion( proj , base = 'twisted' ) : #NEWLINE# #INDENT# '\n    Extract the version number for a given project.\n\n    @param proj: the name of the project. Examples are "core",\n    "conch", "words", "mail".\n\n    @rtype: str\n    @returns: The version number of the project, as a string like\n    "2.0.0".\n    ' #NEWLINE# if ( proj == 'core' ) : #NEWLINE# #INDENT# vfile = os . path . join ( base , '_version.py' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# vfile = os . path . join ( base , proj , '_version.py' ) #NEWLINE# #UNINDENT# ns = { #NEWLINE# #INDENT# '__name__' : 'Nothing to see here' , #NEWLINE# #UNINDENT# } #NEWLINE# execfile ( vfile , ns ) #NEWLINE# return ns [ 'version' ] . base ( )