def createInitFile(dist=None, version=None, sha=None):
 if (version is None):
  with open(os.path.join(thisLoc, 'version')) as f:
   version = f.read()
 if (sha is None):
  sha = _getGitShaString(dist)
 platformStr = _getPlatformString(dist)
 infoDict = {'version': version, 'shaStr': sha, 'platform': platformStr}
 with open(os.path.join(thisLoc, 'psychopy', '__init__.py'), 'w') as f:
  outStr = template.format(**infoDict)
  f.write(outStr)
 print 'wrote init for', version, sha
 return outStr

def createInitFile ( dist = None , version = None , sha = None ) : if ( version is None ) : with open ( os . path . join ( thisLoc , 'version' ) ) as f : version = f . read ( ) if ( sha is None ) : sha = _getGitShaString ( dist ) platformStr = _getPlatformString ( dist ) infoDict = { 'version' : version , 'shaStr' : sha , 'platform' : platformStr } with open ( os . path . join ( thisLoc , 'psychopy' , '__init__.py' ) , 'w' ) as f : outStr = template . format ( ** infoDict ) f . write ( outStr ) print 'wrote init for' , version , sha return outStr
write the version file to psychopy/version .