Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact

Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Python module Y202
Python on the Web
Exercises, examples and other material relating to training module Y202. This topic is presented on public courses Learning to program in Python, Python Programming

Python is an excellent language for text string handling, doing exactly what's required of a language that's to be used on your Web server, to read and filter user inputs, and to return Web pages in response.

Related technical and longer articles
Nasty Characters in Web Applications

Articles and tips on this subjectupdated
4404Which (virtual) host was visited? Tuning Apache log files, and Python analysis
We host a number of domains on our main server, and in order to avoid fragmentation of log files, we keep a sinle composite log. Rather than use a standard logfile format henceforth, I've changed the second field to carry the virtual host name accessed for the request, as that was missing up until this ...
4089Quick and easy - showing Python data hander output via a browser
From today's intermediate Python course - a new example of how to very quickly present the results of running an application on the web - [here]. The objective was to provide an almost-trivial way of letting results be viewed via a remote browser. No forms, no validation needed, no formatting of the ...
1745Moodle, Drupal, Django (and Rails)
In the 1970s, we had C and in that decade and the following one, we put together our systems in that language and its derivatives. In the 1990s, we had Perl and in that decade and the following one, we put together our systems in that language are related ones. In the 2010s, we'll have a wide range ...
2365Counting Words in Python via the web
I love writing things in Python - it's a great language for achieving a great deal in a short time. And it works well got Simple CGI scripts. Today's challenge - to count the number of words (and number of DIFFERENT words) in a piece of text, so give an idea of how much work would be involved in translating ...
2238Handling nasty characters - Perl, PHP, Python, Tcl, Lua
Are your writing or maintaining a web based application that uses forms? If so, you have better be aware of some of the nasty characters that are around! The < character, when echoed back from a users's input 'unchallenged', may form the start of a tag. So that in a relatively benign case, a user ...
433FTP - how to make the right transfers
If you're transfeerring files from one computer to another, you'll probably use an FTP client program - either something with a GUI or the FTP command itself on your local machine, and that will talk to an FTP daemon on the server. It's important to note that you need to navigate to the right directory ...
426Robust checking of data entered by users
10 steps to testing the bullet proofing user inputs or how to avoid being caught by nasties when your script goes live! 1. Test it works with intended entries. It's not going to be much good if it falls over when someone entered a valid piece of data! 2. Test it works (fails correctly) with erroneous ...
903Pieces of Python
From a most interesting Saturday which was spent doing a one on one session on thread, wxPython, etc - some Python snippets that provide unusual demos and hard-to-find answers: The Backtic operator evaluates an expression and returns the result as a string val1 = 16 val2 = 18 result = "The result ...
237Crossfertilisation, PHP to Python
Rasmus Lerdorf's "Do you PHP" talk on our Geek Cruise last October was brilliant - I heard so much about what's behind PHP and how its originator intends it to be used that it give me a real strong understanding of best practise - you'll find further details availble here and elsewhere on this site. Python ...
Examples from our training material
hsapp1.py   Web application mark 1 - 3 pages, sessions, hidden fields
hsapp2.py   Web application, Mark 2 - 3 pages, sessions, hidden fields
hsdemo.htp   Template for hsapp1 and hsapp2
inf.py   Simple web demo - produce form, complete form, act on data entered to form
martin.html   Translation coster - HTML form
martin.py   Translation coster - CGI script
piddle.py   CGI, Python, Web server, HTML - reporting server time
place.py   Python / CGI - read from a form, run an application, fill in a template to respond
pybrow   Browser client
pyhello   Embedding plain text app on the web
pyserv   basic web server
python_mysql_web.py   Python, MySQL, CGI (Web) board
pytop   Analysis of current web log file
tellmewhen.py   Running a Python program through CGI
template.htp   Template for simple web example
visitor.py   Analysing a web access log file
Re-using HTML templates and web helpers for efficient coding
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
Introduction to Python on the Web.
Reading from a form, using templates, other techniques.
Web and Python subjects - state, security, modPython etc..
Where does my Python run?.
How do I link pages together?.
What about security considerations?.
Can I make the Python run more efficiently on the Web?.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre. Also available is the Opentalk Forum for discussion of technical questions.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2015: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/resources/Y202.html • PAGE BUILT: Thu Sep 18 11:03:17 2014 • BUILD SYSTEM: WomanWithCat