当前位置: 首页>>代码示例>>Python>>正文


Python SOAPProxy.registerUser方法代码示例

本文整理汇总了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>' + 
开发者ID:intip,项目名称:da-apps,代码行数:33,代码来源:storageTest.py


注:本文中的SOAPpy.SOAPProxy.registerUser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。