# HG changeset patch # User paulb # Date 1137174133 0 # Node ID 891bc59144326d564ec879d3bcd8c3797b94ccc3 # Parent f9adbd793f3275d7634551b88eeda92aab65d1b6 [project @ 2006-01-13 17:42:03 by paulb] Simplified the sys.path configuration assuming that WebStack is installed and that the example applications are accessible relative to their handlers. diff -r f9adbd793f32 -r 891bc5914432 examples/ModPython/AuthApp/AuthHandler.py --- a/examples/ModPython/AuthApp/AuthHandler.py Fri Jan 13 17:41:08 2006 +0000 +++ b/examples/ModPython/AuthApp/AuthHandler.py Fri Jan 13 17:42:13 2006 +0000 @@ -1,10 +1,9 @@ #!/usr/bin/env python -# NOTE: Path manipulation requires manual customisation. +# NOTE: Path manipulation may require manual customisation. -import sys -sys.path.append("/home/paulb/Software/Python/WebStack") -sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") +import sys, os +sys.path.append(os.path.abspath(os.path.join(__file__, "../../../Common"))) from WebStack.Adapters import ModPython from Auth import AuthResource, AuthAuthenticator diff -r f9adbd793f32 -r 891bc5914432 examples/ModPython/CalendarApp/CalendarHandler.py --- a/examples/ModPython/CalendarApp/CalendarHandler.py Fri Jan 13 17:41:08 2006 +0000 +++ b/examples/ModPython/CalendarApp/CalendarHandler.py Fri Jan 13 17:42:13 2006 +0000 @@ -1,10 +1,9 @@ #!/usr/bin/env python -# NOTE: Path manipulation requires manual customisation. +# NOTE: Path manipulation may require manual customisation. -import sys -sys.path.append("/home/paulb/Software/Python/WebStack") -sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") +import sys, os +sys.path.append(os.path.abspath(os.path.join(__file__, "../../../Common"))) from WebStack.Adapters import ModPython from Calendar import CalendarResource diff -r f9adbd793f32 -r 891bc5914432 examples/ModPython/CookiesApp/CookiesHandler.py --- a/examples/ModPython/CookiesApp/CookiesHandler.py Fri Jan 13 17:41:08 2006 +0000 +++ b/examples/ModPython/CookiesApp/CookiesHandler.py Fri Jan 13 17:42:13 2006 +0000 @@ -1,10 +1,9 @@ #!/usr/bin/env python -# NOTE: Path manipulation requires manual customisation. +# NOTE: Path manipulation may require manual customisation. -import sys -sys.path.append("/home/paulb/Software/Python/WebStack") -sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") +import sys, os +sys.path.append(os.path.abspath(os.path.join(__file__, "../../../Common"))) from WebStack.Adapters import ModPython from Cookies import CookiesResource diff -r f9adbd793f32 -r 891bc5914432 examples/ModPython/FormApp/FormHandler.py --- a/examples/ModPython/FormApp/FormHandler.py Fri Jan 13 17:41:08 2006 +0000 +++ b/examples/ModPython/FormApp/FormHandler.py Fri Jan 13 17:42:13 2006 +0000 @@ -1,10 +1,9 @@ #!/usr/bin/env python -# NOTE: Path manipulation requires manual customisation. +# NOTE: Path manipulation may require manual customisation. -import sys -sys.path.append("/home/paulb/Software/Python/WebStack") -sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") +import sys, os +sys.path.append(os.path.abspath(os.path.join(__file__, "../../../Common"))) from WebStack.Adapters import ModPython from Form import FormResource diff -r f9adbd793f32 -r 891bc5914432 examples/ModPython/LoginApp/LoginHandler.py --- a/examples/ModPython/LoginApp/LoginHandler.py Fri Jan 13 17:41:08 2006 +0000 +++ b/examples/ModPython/LoginApp/LoginHandler.py Fri Jan 13 17:42:13 2006 +0000 @@ -1,10 +1,9 @@ #!/usr/bin/env python -# NOTE: Path manipulation requires manual customisation. +# NOTE: Path manipulation may require manual customisation. -import sys -sys.path.append("/home/paulb/Software/Python/WebStack") -sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") +import sys, os +sys.path.append(os.path.abspath(os.path.join(__file__, "../../../Common"))) from WebStack.Adapters import ModPython from WebStack.Resources.Login import LoginResource, LoginAuthenticator diff -r f9adbd793f32 -r 891bc5914432 examples/ModPython/SessionsApp/SessionsHandler.py --- a/examples/ModPython/SessionsApp/SessionsHandler.py Fri Jan 13 17:41:08 2006 +0000 +++ b/examples/ModPython/SessionsApp/SessionsHandler.py Fri Jan 13 17:42:13 2006 +0000 @@ -1,10 +1,9 @@ #!/usr/bin/env python -# NOTE: Path manipulation requires manual customisation. +# NOTE: Path manipulation may require manual customisation. -import sys -sys.path.append("/home/paulb/Software/Python/WebStack") -sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") +import sys, os +sys.path.append(os.path.abspath(os.path.join(__file__, "../../../Common"))) from WebStack.Adapters import ModPython from Sessions import SessionsResource diff -r f9adbd793f32 -r 891bc5914432 examples/ModPython/SimpleApp/SimpleHandler.py --- a/examples/ModPython/SimpleApp/SimpleHandler.py Fri Jan 13 17:41:08 2006 +0000 +++ b/examples/ModPython/SimpleApp/SimpleHandler.py Fri Jan 13 17:42:13 2006 +0000 @@ -1,10 +1,9 @@ #!/usr/bin/env python -# NOTE: Path manipulation requires manual customisation. +# NOTE: Path manipulation may require manual customisation. -import sys -sys.path.append("/home/paulb/Software/Python/WebStack") -sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") +import sys, os +sys.path.append(os.path.abspath(os.path.join(__file__, "../../../Common"))) from WebStack.Adapters import ModPython from Simple import SimpleResource diff -r f9adbd793f32 -r 891bc5914432 examples/ModPython/SimpleWithLoginApp/SimpleWithLoginHandler.py --- a/examples/ModPython/SimpleWithLoginApp/SimpleWithLoginHandler.py Fri Jan 13 17:41:08 2006 +0000 +++ b/examples/ModPython/SimpleWithLoginApp/SimpleWithLoginHandler.py Fri Jan 13 17:42:13 2006 +0000 @@ -1,10 +1,9 @@ #!/usr/bin/env python -# NOTE: Path manipulation requires manual customisation. +# NOTE: Path manipulation may require manual customisation. -import sys -sys.path.append("/home/paulb/Software/Python/WebStack") -sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") +import sys, os +sys.path.append(os.path.abspath(os.path.join(__file__, "../../../Common"))) from WebStack.Adapters import ModPython from WebStack.Resources.LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator diff -r f9adbd793f32 -r 891bc5914432 examples/ModPython/VerySimpleApp/VerySimpleHandler.py --- a/examples/ModPython/VerySimpleApp/VerySimpleHandler.py Fri Jan 13 17:41:08 2006 +0000 +++ b/examples/ModPython/VerySimpleApp/VerySimpleHandler.py Fri Jan 13 17:42:13 2006 +0000 @@ -1,10 +1,9 @@ #!/usr/bin/env python -# NOTE: Path manipulation requires manual customisation. +# NOTE: Path manipulation may require manual customisation. -import sys -sys.path.append("/home/paulb/Software/Python/WebStack") -sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") +import sys, os +sys.path.append(os.path.abspath(os.path.join(__file__, "../../../Common"))) from WebStack.Adapters import ModPython from VerySimple import VerySimpleResource