def findtemplate(template=None):
 if (MacOS.runtimemodel == 'macho'):
  return None
 if (not template):
  template = TEMPLATE
 for p in sys.path:
  file = os.path.join(p, template)
  try:
   (file, d1, d2) = Carbon.File.FSResolveAliasFile(file, 1)
   break
  except (Carbon.File.Error, ValueError):
   continue
 else:
  raise BuildError, ('Template %r not found on sys.path' % (template,))
 file = file.as_pathname()
 return file

def findtemplate ( template = None ) : if ( MacOS . runtimemodel == 'macho' ) : return None if ( not template ) : template = TEMPLATE for p in sys . path : file = os . path . join ( p , template ) try : ( file , d1 , d2 ) = Carbon . File . FSResolveAliasFile ( file , 1 ) break except ( Carbon . File . Error , ValueError ) : continue else : raise BuildError , ( 'Template %r not found on sys.path' % ( template , ) ) file = file . as_pathname ( ) return file
locate the applet template along sys .