Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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

 

Thanks!

 

Mike

  • Author

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:

 

http://www.thesitewizard.com/archive/addcgitoapache.shtml

 

(replace perl references with python)

 

http://docs.python.org/library/cgi.html

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?

http://www.modpython.org/

 

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

  • Author

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.

  • Author

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:

http://httpd.apache.org/modules/python-download.cgi

 

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

UNISERVER_FOLDER/udrive/usr/local/apache2

 

(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:

http://webpython.codepoint.net/mod_python_...e_configuration

Hey! That’s neat most appreciated :)

Certainly will help other users contemplating using Python.

 

All the best

Ric :D

  • 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.

  • 3 years later...

I'd like to add Python support to ZeroXI (a modular system). The module isn't readily available for download so what do I do to add this support?

Join the conversation

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

Guest
Reply to this topic...

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.