[Karrigell-main] Some propositions
Brought to you by:
quentel
From: didier w. <did...@fr...> - 2003-05-15 10:12:54
|
1) Setup an automated test-suite. We have to assert that any combination of python and html work (embedded loops, if in a loop ...) We have to assert that Karrigell works in a multi-threaded context. We should be able to change a piece of code, without taking the risk to break an unknown feature. 2) Add a command line option to choose a different Karrigell.ini file. Karrigell should be usable in different context : a main application, a d= emo,=20 a test-suite ... 3) Add an includePath where the included scripts are searched. So, with : =09[ Directories] =09root =3D somewhere/public =09includePath =3D somewhere/stuff : elsewhere : yetanotherdir =09the scripts in one of the directories 'somewhere/stuff', ... =09will be usable from any template =09without being served by the http server. 4) Add an application specific pythonPath to be added to sys.path So, with : =09[ Directories] =09root =3D somewhere/public =09pythonPath =3D somewhere/py-code : elsewhere : yetanotherdir =09the python scripts in one of the directories 'somewhere/py-code', ... =09may be imported from any page =09without being served by the http server. 5) Add an application specific init python script or function When the server is launched, the served application may have to do some=20 initialization jobs. Futhermore the result of this initialization should = be=20 transmitted to each page handler. The simplest way seems to be a namespac= e. Add some lines in the Karrigell.ini : =09[ Main ] =09init =3D some python module which defines a namespace object=20 At Karrigell launch, import this init module and get a reference to this=20 app-namespace. For each request, exec the python code of the requested page with the=20 app-namespace as global namespace. Put all the request infos in the local namespace. |