Jump to content
The Uniform Server Community

How feasible would it be for me to make a python plugin?


Recommended Posts

Hi guys, I just discovered the project and I've been searching the forums and wiki. I see one or two abandoned attempts to produce a python plugin, and a little discussion indicating a desire to keep the package focused on PHP.


Is python something you maintainers would even want in the project if I made it?


How involved would it be for me to do, and where would I start gathering info on how to do it?


Why I ask: I'm starting a project for which I'd much rather use python (including pywin32-level capabilities) than PHP.


My technical level: experienced apache admin and professional coder





Link to comment
Share on other sites

Nevermind -- I realized I can just use python/CGI!


It's probably slower than a mod_python solution, but in a one-user scenario, I hope it's fine.


I do want to distribute the results so I'll need to come up with a bundling solution. If that is something that anyone is interested in hearing about, reply and let me know.


Just for reference, here's about all I currently know about running python as a CGI handler on windows:




(replace perl references with python)



Link to comment
Share on other sites

To be honest this is way out of my league.

Is this not a programming language?

I just checked the portable download! Package file size (compressed): 19MB


Not sure if this was completed?



If it’s an API module will be much faster than CGI.


Hey “Shouldn't have claimed to be an experienced apache admin” no problem! I am sure that’s not true and your expertise is welcome. :)


All the best

Ric :D

Link to comment
Share on other sites

Oh -- thanks for the reply, Ric! Sorry to edit my post underneath you apparently while you were responding.


Ok I'm going to try just dropping in mod_python for Windows. I got the impression from previous discussions that doing it for US was a project, but maybe things have changed since those posts.


I'll post back and let you know.

Link to comment
Share on other sites

Ok, I haven't tested with the win32com module yet, but simply getting mod_python running was easy:


1. Download the win32 build of mod_python from here:



2. When the installer asks you where your apache installation is, point it to



(Where UNISERVER_FOLDER is the folder on disk where you've put your Uniform Server). This simply tells the installer where to find the /modules directory off of your apache2 directory, which is where mod_python.so belongs


3. Add the following line to apache.conf:

LoadModule python_module modules/mod_python.so


4. Set the handling method of your choice as described here:


Link to comment
Share on other sites

  • 10 months later...

Hey! That’s neat most appreciated :angry:

Certainly will help other users contemplating using Python.


All the best

Ric :angry:

I was able to get Python going on UniServer 5.6.6
  • Install ActivePython 2.5 to [driveletter]:\UniServer\usr\bin\Python25 Remember the Windows backslashes.
  • Install mod_python for 2.5 and point it to your Apache folder
  • Insert the line LoadModule python_module modules/mod_python.so in httpd.conf
  • Set script shebang #!/Uniserver/usr/bin/Python25/python

Running feedvalidator from the /www directory works great (CSS doesn't work from the cgi-bin).

Good idea to add lines like this to .htaccess (all your virtual host names):

Allow from localhost:80

Allow from localhost

Allow from server

That way if a Python script calls an image or something with a query string the server will allow it.

Link to comment
Share on other sites

  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...