How do you setup a Python enviroment on home windows computer in order to start writing and running Python scripts, can there be an install bundle? Also which database must i use?
Sorry I ought to of pointed out that i'm by using this for internet based programs. Will it require apache? or will it use another http server? What's the standard setup for Python running web applications?
Download the Python 2.6 Home windows installer from python.org (direct link). If you are just learning, make use of the incorporated SQLite library so it's not necessary to fiddle with database servers.
Most web design frameworks (Django, Turbogears, etc) include a built-in webserver command that works on the local computer without Apache.
Bundle: opt for Activestate's Python, which bundles many helpful win32-related libraries. It's no version 5.6 yet, but many code you will find online describes 2.5 minimizing anyway.
Database: the popular open-source DBs are really simple to configure. But as John already recommended, for straightforward beginning stuff only use SQLite which already comes bundled up with Python.
Web server: is dependent around the scale. You are able to configure Apache, yes, however for trying simple things this is a quite complete web server in Python which will also serve CGI scripts writte in Python:
import CGIHTTPServer import BaseHTTPServer class Handler(CGIHTTPServer.CGIHTTPRequestHandler): cgi_directories = ["/cgi"] PORT = 9999 httpd = BaseHTTPServer.HTTPServer(("", PORT), Handler) print "serving at port", PORT httpd.serve_forever()
I highly recommend ActiveState Python for python on home windows development. It arrives with Win32Com as well as other treats, includes a mature and clean installer, a chm version from the paperwork and works very well. I personally use this all the time.
For a database, Activestate includes odbc support, which plays very nicely with SQL server. I have also been with them dealing with Sybase and DB2/400 (even though connection strings for that latter are usually rather convoluted). For Oracle, I suggest CX_Oracle because the best interface library. Native motorists for many proprietary and open-source databases (for example MySQL and PostGreSQL) also exist. Recent versions of Python (from 2.5 let's start IIRC) include SQLite bundled up as standard.
Might I would recommend considering Karrigell? It's actually a nice Python web framework if you do not require everything Django and Turbogears offers. It may be simpler that you should use web frameworks before you get confident with them.
For development, I suggest installing the most recent SPE IDE. It will supply you almost all the various tools you'll need, and it also includes wxGlade for GUI development.
Django tutorial How to install Django provides an example the way a web-development Python atmosphere may look.