[jToolkit-cvs] jToolkit/demo __init__.py,NONE,1.1 helloworld.py,NONE,1.1
Brought to you by:
davidfraser,
friedelwolff
From: <dav...@us...> - 2003-09-25 18:18:43
|
Update of /cvsroot/jtoolkit/jToolkit/demo In directory sc8-pr-cvs1:/tmp/cvs-serv20907 Added Files: __init__.py helloworld.py Log Message: added basic hello world demo --- NEW FILE: __init__.py --- """jToolkit.demo package index""" # Copyright 2002, 2003 St James Software # # This file is part of jToolkit. # # jToolkit is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # jToolkit is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with jToolkit; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # list of modules in this package __all__ = ["helloworld"] --- NEW FILE: helloworld.py --- """this is a Hello World-style demonstration program of jToolkit""" from jToolkit.web import server from jToolkit.widgets import widgets # Copyright 2002, 2003 St James Software # # This file is part of jToolkit. # # jToolkit is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # jToolkit is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with jToolkit; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA class HelloWorldServer(server.AppServer): """the Server that serves the Hello World Pages""" def getpage(self, pathwords, session, argdict): """return a page that will be sent to the user""" return widgets.PlainContents("Hello World") class HelloWorldConfig: """the configuration parameters for a hello world server""" serverclass = HelloWorldServer localedir = "/share/sjsoft/code/jSuite.py/localize" localedomains = ['jToolkit', 'jLogbook.python'] |