August 26th, 2005, 05:45 AM
intranet python app as server instead of Apache?
I'm trying my hand at a python database script. This is for a standalone computer with python mysql and apache. Do I really need apache for localhost at all? Seems like overkill. I'm thinking of using python to serve the data to the browser based on python script cgi requests to/from the database.
Sounds like a nice little project. If you could mention your fav modules to accomplish this task please reply. Any good websites with tutorials that you like would help a lot too.
Would SimpleCGIServer be enough or am I about to choke on a particularly large piece of steak?? (pythons can swallow anything so I hope it can here too )
Thanks for any tips
August 27th, 2005, 11:49 AM
found link for simplehttpserver
it's a link to bruce eckel's explanation of using python to handle a localhost website for csv files. it enters records into a csv file and is setup without sessions, so saves to file each time. Really good working example of simpleHTTPServer in action.
Even if you don't plan on using csv at all, I think it's still a good idea to read if you ever need to use simpleHTTPServer.
Thanks to this, I'll only need python and mysql to run my app, which is what i was looking for
August 27th, 2005, 03:22 PM
just wanted to point out that apache can run pretty clean with removing a few modules, I also recommend using mod_python instead of python though cgi. A lot more secure and the speed increase is insain.
August 27th, 2005, 05:34 PM
I've had a quick play with Twisted, which is very fast & very cool. BaseHTTPServer is another one to look at.
However, my preference would be for mod_python on apache too, but it depends on your needs.