Jump to content


Photo

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


  • Please log in to reply
7 replies to this topic

#1 mikeh

mikeh

    Newbie

  • Member
  • Pip
  • 4 posts
  • Main OS: Windows XP

Posted 05 August 2009 - 05:20 PM

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

#2 mikeh

mikeh

    Newbie

  • Member
  • Pip
  • 4 posts
  • Main OS: Windows XP

Posted 05 August 2009 - 05:57 PM

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.thesitewi...itoapache.shtml

(replace perl references with python)

http://docs.python.o...ibrary/cgi.html

#3 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 05 August 2009 - 06:29 PM

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

#4 mikeh

mikeh

    Newbie

  • Member
  • Pip
  • 4 posts
  • Main OS: Windows XP

Posted 05 August 2009 - 06:44 PM

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.

#5 mikeh

mikeh

    Newbie

  • Member
  • Pip
  • 4 posts
  • Main OS: Windows XP

Posted 10 August 2009 - 12:58 PM

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....on-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.cod...e_configuration

#6 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 10 August 2009 - 01:26 PM

Hey! That’s neat most appreciated :)
Certainly will help other users contemplating using Python.

All the best
Ric :D

#7 musicvid

musicvid

    Newbie

  • Member
  • Pip
  • 7 posts
  • Main OS: Windows Vista

Posted 13 June 2010 - 06:55 PM

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.

#8 arlanda

arlanda

    Newbie

  • Member
  • Pip
  • 7 posts
  • Gender:Male
  • Main OS: Windows 7

Posted 14 February 2014 - 10:58 AM

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?






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users