echo.py
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:2k
- #!/usr/bin/python
- # $Id: echo.py,v 1000.0 2003/10/31 21:38:18 gouriano Exp $
- #
- # Author: Josh Cherry
- #
- # ask gbench for some arguments and echo them back
- import sys
- import cgi
- input = sys.stdin.read()
- args = cgi.parse_qs(input)
- action = args['action'][0]
- # if a get info call ...
- if action == 'info':
- print '''
- PluginInfo ::= {
- ver-major 0,
- ver-minor 0,
- ver-revision 0,
- ver-build-date "",
- class-name "echo.py",
- menu-item "Test scripts/echo",
- tooltip "echo arguments we are handed",
- commands algo {
- {
- command 3,
- args {
- {
- name "locs",
- desc "Locations to evaluate",
- data array {
- object {
- docaddr "(nil)",
- objaddr "(nil)",
- subtype "Seq-loc"
- }
- }
- },
- {
- name "integers",
- desc "Some Integers",
- data array {
- integer 1
- }
- },
- {
- name "string",
- desc "A string",
- data single string ""
- },
- {
- name "double",
- desc "A double",
- data single double {6, 10, -1}
- }
- }
- }
- }
- }
- '''
- sys.exit(0)
- # otherwise, run
- print input
- print args
- # ===========================================================================
- # $Log: echo.py,v $
- # Revision 1000.0 2003/10/31 21:38:18 gouriano
- # PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.3
- #
- # Revision 1.3 2003/10/29 20:12:05 jcherry
- # Reflect new spec for plugin args
- #
- # Revision 1.2 2003/10/07 13:47:03 dicuccio
- # Renamed CPluginURL* to CPluginValue*
- #
- # Revision 1.1 2003/07/28 18:24:31 jcherry
- # Initial version
- #
- # ===========================================================================
- #
- # ===========================================================================
- # PRODUCTION $Log: echo.py,v $
- # PRODUCTION Revision 1000.0 2003/10/31 21:38:18 gouriano
- # PRODUCTION PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.3
- # PRODUCTION
- # ===========================================================================
- #