Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 750

Show
Ignore:
Timestamp:
10/22/05 13:57:48
Author:
fumanchu
Message:

Updated the example in xmlrpcfilter.py comments.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/lib/filter/xmlrpcfilter.py

    r730 r750  
    8282##  
    8383## EXAMPLE CODE FOR THE SERVER: 
    84 ##    from cherrypy.lib.filter.xmlrpcfilter import XmlRpcFilter 
    85 ##    from cherrypy import cherrypy 
     84##    import cherrypy 
    8685## 
    8786##    class Root: 
    88 ##        _cpFilterList = [XmlRpcFilter()] 
    89 ##         
    90 ##        def longString(self,s,times): 
    91 ##            return s*times 
     87##        def longString(self, s, times): 
     88##            return s * times 
    9289##        longString.exposed = True 
    9390## 
    9491##    cherrypy.root = Root() 
     92##    cherrypy.config.update({'xmlRpcFilter.on': True, 
     93##                            'socketPort': 9001, 
     94##                            'threadPool':0, 
     95##                            'socketQueueSize':10 }) 
    9596##    if __name__=='__main__': 
    96 ##        cherrypy.server.start(configMap = {'socketPort': 9001, 
    97 ##                                      'threadPool':0, 
    98 ##                                      'socketQueueSize':10 }) 
     97##        cherrypy.server.start() 
     98## 
    9999## EXAMPLE CODE FOR THE CLIENT: 
    100100## >>> import xmlrpclib 
    101101## >>> server = xmlrpclib.ServerProxy('http://localhost:9001') 
    102 ## >>> assert server.longString('abc',3) == 'abcabcabc' 
     102## >>> assert server.longString('abc', 3) == 'abcabcabc' 
    103103## >>> 
    104104###################################################################### 

Hosted by WebFaction

Log in as guest/cpguest to create tickets