2011-05-24 44 views

回答

0

我沒有完全理解這個問題。 但考慮到你有什麼樣的一些應用程序的CherryPy一個複選框, 可以向前傳遞選定值,

<input type="checkbox" name="cpu" value="host1" /> host1<br> 

.....

class Root(object): 
     @cherrypy.expose 

    def default(self, **kwargs): 
     if len(kwargs) > 0: 
      print 'Metric to be collected and selected arguments:' 
     print ''' 
Metric: | Choosen arguments passed to remote script: %s | %s''' %(target, selection)