def do_sync(reg=None):
 if (not reg):
  reg = registry.AppRegistry()
 apps = reg.get_all_apps()
 try:
  pthfile = pth.PthFile()
  pthfile.sync(apps)
  pthfile.save()
  build.make_syncdb()
  return True
 except (OSError, SystemError) as ex:
  LOG.error(("Failed to update the .pth file. Please fix any problem and run `%s --sync'\n%s" % (PROG_NAME, ex)))
  return False

def do_sync ( reg = None ) : if ( not reg ) : reg = registry . AppRegistry ( ) apps = reg . get_all_apps ( ) try : pthfile = pth . PthFile ( ) pthfile . sync ( apps ) pthfile . save ( ) build . make_syncdb ( ) return True except ( OSError , SystemError ) as ex : LOG . error ( ( "Failed to update the .pth file. Please fix any problem and run `%s --sync'\n%s" % ( PROG_NAME , ex ) ) ) return False
sync apps with virtualenv .