Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
Python and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Lua, etc
 
Counting 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 it.

Web page onto which to paste the text is here. Source code of the script is here. Source code of the Python program is here.

A word of warning - I have taken great care NOT to echo all the text (protects me against injection attacks) - and you need to do the same on your pages. If you're not sure what I mean, read this blog further or I'll tell you more on the Python Course.
(written 2009-08-18, updated 2009-08-19)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
Y202 - Python on the Web
  [4536] Json load from URL, recursive display, Python 3.4 - (2015-10-14)
  [4404] Which (virtual) host was visited? Tuning Apache log files, and Python analysis - (2015-01-23)
  [4089] Quick and easy - showing Python data hander output via a browser - (2013-05-15)
  [2238] Handling nasty characters - Perl, PHP, Python, Tcl, Lua - (2009-06-14)
  [1745] Moodle, Drupal, Django (and Rails) - (2008-08-08)
  [903] Pieces of Python - (2006-10-23)
  [433] FTP - how to make the right transfers - (2005-09-01)
  [426] Robust checking of data entered by users - (2005-08-27)
  [237] Crossfertilisation, PHP to Python - (2005-03-06)

Y303 - Python Network Programming
  [4087] Python network programming - new FTP and socket level examples - (2013-05-14)
  [2765] Running operating system commands from your Python program - (2010-05-14)
  [2695] TCP v UDP / Client v Server - Python examples - (2010-03-25)
  [2694] Multiple processes (forking) in Python - (2010-03-25)
  [2368] Python - fresh examples of all the fundamentals - (2009-08-20)


Back to
Getting it right from the start - new programmers
Previous and next
or
Horse's mouth home
Forward to
At the end of the course
Some other Articles
Using a cache for efficiency. Python and PHP examples
Learning to program - how to jump the first hurdles
At the end of the course
Counting Words in Python via the web
Getting it right from the start - new programmers
Alpaca Case or Camel Case
Thornham Farm Shop, Seend Cleeve, nr Melksham
Geocoding - converting address to latitude / Longitude with PHP via Google
Error Handling in Lua with assert and pcall
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2019: 404 The Spa • Melksham, Wiltshire • United Kingdom • SN12 6QL
PH: 01225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/2365_Cou ... e-web.html • PAGE BUILT: Sat May 27 16:49:10 2017 • BUILD SYSTEM: WomanWithCat