Affichage des articles dont le libellé est mod_python. Afficher tous les articles
Affichage des articles dont le libellé est mod_python. Afficher tous les articles

samedi 20 novembre 2010

SPMPT for python programmers

Hello,



today I will move lights on hidden feature provied by SPMPT. When I release the first version of SPMPT, my main intention was to make installation of Trac and Subversion easly for evry developpers. But with time and users feedback, I know now, Python programmers using Mac found in SPMPT a great and easy tool to install python on Mac. So this is a little "Hello world" tutorial for people who used SPMPT, and want to try python in MAMP.




Apache configuration

First you have to prepare the environment, you need to create a Directory in Apache.
create a new file, for example mypython.conf

<IfModule !mod_python.c>
  LoadModule python_module     modules/mod_python.so
</IfModule>
 
<Directory /Applications/MAMP/htdocs/python-hello>
 AddHandler python-program .py
    PythonHandler hello 
 PythonDebug On #for developpemnet enable debug
</Directory>


Your first program

You have to create the python-hello folder in /Applications/MAMP/htdocs/

now we will create the python script : /Applications/MAMP/htdocs/python-hello/hello.py


01. from mod_python import apache
02.  
03. def handler(req):
04.  req.content_type = "text/html"
05.  req.send_http_header()
06.  req.write('<html><body>')
07.  req.write("Hello<br/>")
08.  req.write("This is a loop for in python : <br/>")
09.  a = ['cat', 'window', 'defenestrate']
10.  for x in a:
11.  req.write(x)
12.  req.write('<;br/>')
13. req.write('</body></html>')
14. return apache.OK



For advanced programmers, Django is recommended.


I'm not a python programmer so, if you have some questions, ask google.


jeudi 18 février 2010

SPMPT 2.0 : Trac on MAMP for your Mac

Hello !
I'm happy to present you SPMPT 2.0, this new release is build for MAMP 1.8.x for Leopard and Snow Leopard, the package is Universal Binary.
New in SPMPT 2.0 :
- MAMP 1.8.x support !
- Snow Leopard support !
- Trac 0.11.6
- Subversion 1.6.9
- Python 2.6.4
- mod_python 3.3.1

Everything to get a svn server on your Mac, in few clicks !

What's new in futur release ?
I already planed a release for MAMP Pro.
and because I think SPMPT is the better web developper environment, I will include a new software : PostgreSQL, everything in a easy to install package !

Hope you will enjoy this new package.
Regards
Cédric


('DiggThis’)

lundi 15 décembre 2008

Trac SVN Python available for MAMP, your SVN server on your Mac

Hi!
two weeks ago, I talk you about a package for SVN (subversion) for MAMP (spmpt).
Today I'm glad to tell you, I include Python (2.6), ModPython (3.3.1), Trac (0.11.2.1) and well Subversion (1.5.2) in a new package for MAMP.
This package allow you to setup with few steps a perfect versionning environment based on SVN and this amazing Trac.
Download and install the package
Create your local svn repository (svnadmin create /path/to/repository)
Create your local trac project environment (trac-admin /path/to/trac-project initenv)
Configure svn.conf and trac.conf and include them in httpd.conf or ssl.conf with the rights paths
Reboot MAMP ! and get your subversion server on your Mac, with very nice GUI Trac.

Thank for reporting bugs !
Regards

Cédric Ferry

the package :

mercredi 3 décembre 2008

SVN 1.5.2 for MAMP 1.7 (Leopard & Tiger (Intel & PPC))

Hi !
I'm happy to present my first package of SVN (subversion) 1.5.2 for MAMP 1.7, this package is easy to use. follow 3 steps and SVN will be installed inside your MAMP folder (/Applications/MAMP/)

You can download for free this package

Now, i'm working for full integration of Trac and Python (plus mod_python) for MAMP.
I get it working on my test machine, I will package it soon.
The easier way to get a subversion server on mac !

If you like this package, please consider donation.

Regards

Cédric Ferry