odoo_dev 开发培训作业:图书管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
358B

  1. from xmlrpc import client
  2. server_url = 'http://localhost:9999'
  3. db_name = 'library_13'
  4. username = 'admin'
  5. password = 'admin162534!'
  6. common = client.ServerProxy('%s/xmlrpc/2/common' % server_url)
  7. user_id = common.authenticate(db_name, username, password, {})
  8. if user_id:
  9. print("Success: User id is", user_id)
  10. else:
  11. print("Failed: wrong credentials")
上海开阖软件有限公司 沪ICP备12045867号-1