Work started: (MODPYTHON-156) Module imports from server
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Mod-Python > Work started: (MODPYTHON-156) Module imports from server




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Work started: (MODPYTHON-156) Module imports from server  
Graham Dumpleton (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-27-06 11:52 AM

[ http://issues.apache.org/jira/brows...ON-156?page=all ]

Work on MODPYTHON-156 started by Graham Dumpleton

> Module imports from server side includes and new importer.
> ----------------------------------------------------------
>
>          Key: MODPYTHON-156
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-156
>      Project: mod_python
>         Type: Sub-task

>   Components: importer
>     Reporter: Graham Dumpleton
>     Assignee: Graham Dumpleton

>
> With old module importer, where Python*Handler directives are used in a di
rectory context, that directory is added to sys.path. Now where Python code 
is being used with server side includes in that same directory and code of f
orm:
>   module = apache.import_module("xxx")
> is used with "xxx.py" also being in the same directory, it will be found d
ue to the directory being added to sys.path.
> With the new module importer, the directory isn't added to sys.path and so
 the module would not be found.
> In the case of a handler module (rather than SSI Python code), such a module impor
t would still work, as the new module importer is smart enough to realise that the c
aller was also imported using the new module importer and thus would look in the sam
e d
irectory first or as necessary, in the directory the Python*Handler directive was specified 
for. This will not work for SSI code though, as it is not part of an imported module and is 
eval/exec'd on each page request.
> What is thus required is for the global environment in which the SSI code is execu
ted for a specific page, to be automatically marked up in such a way that the new mo
dule importer believes it was imported as a module by the new module importer, thus 
tri
ggering it to look in the same directory for modules.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:13 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register