cheers
Mike
On Monday, October 28, 2002, at 12:45 PM, Aaron Held wrote:
You probably want to check out the /path/to/webware/bin/MakeAppWorkDir.pyAny code in the MyContext directory should be presentation layer.
utility. With that you can define a working directory for your application.
You basicly separate the Webware code from your own application code.
Now, when you import a python module, just try to remember that
"/path/to/webware" and "/path/to/AppWorkDir" are in your sys.path when running the webware application server.
If you want your own libraries you create a python package (directory just like Java) and put it in your newly created workspace or your python path. This is analogous to Java classpath.
I put general use code in the my overall python path (like database drivers), website specific stuff in a Modules directory alongside MyContext, and presenatation pags in MyContext
../Apps/Portal/
.............../Configs
.............../Logs
.............../Mods
....................UserManager.py
....................SiteConfiguration.py
....................FavitesManager.py
.............../MyContext
.....................Welcom.py
.....................Login.py
.....................Hello.psp
Then in Login I have something like
from Mods.UserManager import UserManager
and in UserManager I have
import PyPgSQL #database driver - in pytyhon classpath
-Aaron
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
