logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: python packages information
Author
shaggy



Joined: 15 Nov 2005
Posts: 82
Location: Dundee, Michigan

PostPosted: Fri 11 May '07 16:21    Post subject: python packages information Reply with quote

I have been working on my webserver here lately. I have posted on here about how to get php pear information which I was referred to making a phppear.php file, perl packages (ppm's) which I was referred to perl diver, the making of extra.pl file too. Among other suggestions that was giving to me. Now it's time for python:

1.) How do I determine which python packages are installed (from cheeseshop)?
2.) Is there a way to start'em up in the webserver or are they already started up in the webserver? Like u do with perl (extra.pl) or are they already loaded up into the server with mod_python?
3.) How do I test to see if python is loaded up properly into the webserver/What is the test file to determine python is loaded up properly? (for example:with php there's phpinfo.php file which u can input into your browser) Basically what is the same for python?
4.) What is the information that needs to be inputted into httpd.conf to load up python? (any add type,add handler,loadmodule,etc.)

Thanks
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Fri 11 May '07 20:06    Post subject: Reply with quote

re: "How do I determine which python packages are installed"
If they are installed in Python, then they are also installed for mod_python.
For a standalone (not web page) program to do this, try pkgsearch.py.

re: "Is there a way to start'em up in the webserver"
Not necessary. Python packages are not "started up"

re: "How do I test to see if python is loaded up properly"
Request http://localhost/mpinfo

re: "What ... needs to be in httpd.conf"
Here's an example for Python 2.4 using the "publisher" (i.e. the simplest) handler:
Code:
LoadFile "C:/Python24/python24.dll"
LoadModule python_module modules/mod_python.so
<IfModule python_module>
    <Directory "C:/Apache2/htdocs">
        AddHandler mod_python .py
        PythonHandler mod_python.publisher
        PythonDebug On
    </Directory>
    <Location /mpinfo>
        SetHandler mod_python
        PythonHandler mod_python.testhandler
    </Location>
</IfModule>

You can get mod_python at http://www.modpython.org/.
The docs are at http://www.modpython.org/live/current/doc-html/.
Back to top
shaggy



Joined: 15 Nov 2005
Posts: 82
Location: Dundee, Michigan

PostPosted: Tue 15 May '07 19:52    Post subject: Reply with quote

I have python 2.5 and I've even did a search for python25.dll and even python.dll and can't find it in my python folder. What I actually did is wildcard (*.dll) search for it and can't find it.

tdonovan wrote:
LoadFile "C:/Python24/python24.dll"
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Tue 15 May '07 22:50    Post subject: Reply with quote

It might me in %SystemRoot%\System32. The Python install often puts it there (a bad practice IMHO - System32 is for Microsoft software).
If so, you would not need the LoadFile directive, since System32 is always in the PATH on Windows.

If Python 2.5 is working for you from the command line, then you certainly have python25.dll somewhere.

It isn't clear - have you tried to use mod_python with Apache and it failed to work? If so, what's the error?

-tom-
Back to top


Reply to topic   Topic: python packages information View previous topic :: View next topic
Post new topic   Forum Index -> Other Software