[mod_python] mod_php vs mod_py - include vs. import

Michael C. Neel neel at mediapulse.com
Mon Jan 5 14:33:55 EST 2004

We use the reload method here, if PythonDebug is set to on, basically:

    debug = req.get_config().has_key('PythonDebug')

    if debug:

See the python docs on reload before using, it doesn't work in all
cases.  I also think there was a mention on the list of an apache.import
method to use so this wouldn't be needed, so you may want to do some
searching on the archives; not sure if it was a mod_python thing or a
patch someone did.


> -----Original Message-----
> From: fowlertrainer at anonym.hu [mailto:fowlertrainer at anonym.hu] 
> Sent: Monday, January 05, 2004 3:46 AM
> To: mod_python at modpython.org
> Subject: [mod_python] mod_php vs mod_py - include vs. import
> Hi !
> I want to control my website with only one py file: the main.py.
> But I got experience with one ugly thing in mod_python.
> In mod_php, the main.php file is can include many files, and all of
> them can include many other files.
> When I modify some or one of these files, the website is refreshed.
> But in mod_python, I cannot use the include, I have only one 
> way to share/split my sources: the import.
> It is ok, but when I modify some of these imported files, the 
> website is not refreshed !!!
> My solution in this time to I use only one file.
> It is not too good, because it is growing too much, and I cannot
> separate it to units.
> Have any solution to this problem ????
> Thanx for any advance !!!
> -- 
> Best regards,
>  fowlertrainer                          mailto:fowlertrainer at anonym.hu
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list