For 2021 - online Python 3 training - see ((here)).
Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7. We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.
Please ask about private 'maintenance' training for Python 2, Tcl, 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 Y303 - Python Network Programming [2368] Python - fresh examples of all the fundamentals - (2009-08-20) [2694] Multiple processes (forking) in Python - (2010-03-25) [2695] TCP v UDP / Client v Server - Python examples - (2010-03-25) [2765] Running operating system commands from your Python program - (2010-05-14) [4087] Python network programming - new FTP and socket level examples - (2013-05-14) Y202 - Python on the Web [237] Crossfertilisation, PHP to Python - (2005-03-06) [426] Robust checking of data entered by users - (2005-08-27) [433] FTP - how to make the right transfers - (2005-09-01) [903] Pieces of Python - (2006-10-23) [1745] Moodle, Drupal, Django (and Rails) - (2008-08-08) [2238] Handling nasty characters - Perl, PHP, Python, Tcl, Lua - (2009-06-14) [4089] Quick and easy - showing Python data hander output via a browser - (2013-05-15) [4404] Which (virtual) host was visited? Tuning Apache log files, and Python analysis - (2015-01-23) [4536] Json load from URL, recursive display, Python 3.4 - (2015-10-14)
Some other Articles
Using a cache for efficiency. Python and PHP examplesLearning to program - how to jump the first hurdlesAt the end of the courseCounting Words in Python via the webGetting it right from the start - new programmersAlpaca Case or Camel CaseThornham Farm Shop, Seend Cleeve, nr MelkshamGeocoding - converting address to latitude / Longitude with PHP via GoogleError 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).
|
|