本文整理汇总了Python中SOAPpy.SOAPProxy.registerUser方法的典型用法代码示例。如果您正苦于以下问题:Python SOAPProxy.registerUser方法的具体用法?Python SOAPProxy.registerUser怎么用?Python SOAPProxy.registerUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SOAPpy.SOAPProxy
的用法示例。
在下文中一共展示了SOAPProxy.registerUser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SOAPProxy
# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import registerUser [as 别名]
print
if stat.flError:
print "### %s failed: %s ###" % (cmd, stat.message)
else:
print "### %s successful: %s ###" % (cmd, stat.message)
return not stat.flError
server = SOAPProxy(encoding="US-ASCII",
proxy=PROXY,
soapaction="/xmlStorageSystem",
http_proxy=http_proxy,
# config=SOAPConfig(debug=1)
)
# Register as a new user or update user information
reg = server.registerUser(email=EMAIL, name=NAME, password=PASSWORD, clientPort=MY_PORT, userAgent=SOAPUserAgent())
printstatus("registerUser", reg)
# See what this server can do
reg = server.getServerCapabilities (email=EMAIL, password=PASSWORD)
if printstatus("getServerCapabilities", reg):
print "Legal file extensions: " + str(reg.legalFileExtensions)
print "Maximum file size: " + str(reg.maxFileSize)
print "Maximum bytes per user: " + str(reg.maxBytesPerUser)
print "Number of bytes in use by the indicated user: " + str(reg.ctBytesInUse)
print "URL of the folder containing your files: " + str(reg.yourUpstreamFolderUrl)
# Store some files
reg = server.saveMultipleFiles (email=EMAIL, password=PASSWORD,
relativepathList=['index.html','again.html'],
fileTextList=['<html><title>[email protected] home page</title><body>' +