which executes ok. I want to import files written by me, but it cannot
find it in path. Can anyone explain what should I do to import not(!)
system files. Searched all the web, no answer is available.
from os.path import dirname, abspath
path.append(abspath(dirname(__file__)))
It put the folder that contains you file in the python path
Cheers
But did you read any of the mod_wsgi documentation. ;-)
Read about WSGIPythonPath if using embedded mode:
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPythonPath
If using daemon mode read about python-path option to
WSGIDaemonProcess directive:
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess
Also read Python documentation about 'sys.path' variable and module
search paths:
http://docs.python.org/library/sys.html#sys.path
This mechanism can be used to extend the path in the WSGI script file.
For other related information about Python module search paths and
mod_wsgi also read:
http://code.google.com/p/modwsgi/wiki/VirtualEnvironments
http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode#Reloading_In_Embedded_Mode
Graham
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To post to this group, send email to mod...@googlegroups.com.
To unsubscribe from this group, send email to modwsgi+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.