def create_user(self, username, password, account_type='xmpp_user'):
    AppScaleLogger.log("Creating new user account {0}".format(username)) 
    while 1:
      try:
        result = self.server.commit_new_user(username, password, account_type,
          self.secret)
        break
      except Exception, exception:
        AppScaleLogger.log("Exception when creating user: {0}".format(exception))
        AppScaleLogger.log("Backing off and trying again")
        time.sleep(10)

    if result != 'true':
      raise Exception(result)
Creates a new user account, with the given username and hashed password.
dataset/ETHPy150Open AppScale/appscale-tools/lib/user_app_client.py/UserAppClient.create_user