Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
For 2023 - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))

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 Y117
Already written modules
Exercises, examples and other material relating to training module Y117. This topic is presented on public courses Learning to program in Python, Python Programming

Articles and tips on this subjectupdated
4710Searching a Json or XML structure for a specific key / value pair in Python
With data loaded from JSon or XML structures, you'll often want to search for attributes by element name - without having to code the structure, and with the code adapting itself to mean subtle structure changes in the suppied data. Here's an example written during lat week's tailored Intermediate Python ...
4708Scons - a build system in Python - building hello world
Scons ... It's a build system!! Like Make (if you're familiar with that) or Ant (if you know that!) The initial problem being solved ... You have a whole lot of different development files (source files, libraries, manual text, configuration, etc) and a whole load of steps you use to convert those ...
4697Month, Day, Year number to day of week and month names in Python - English and Swedish
I had run a program (actually an answer to an exercise from our Lerning to program in Python course) which prints out a day and month number. And my group asked "how do I get the month by name?" and "What day of the week is that?" Good questions ... and the answer in Python always starts ... "If you're ...
4696Programming with random numbers - yet re-using the same values for testing
There are certain programming jobs where you want to simulate / model random occurrences - for example to shuffle a pack of cards, or (a manpower planning example from many years back) work out whether people leave an organisation duirng a year; it's no good working with percentages as you'll end up ...
4452Binary data handling - Python and Perl
Handling binary data has become a somewhat rarer requirement over tiem, but that doensn't mean the need has gone away - and on last week's Python course, my delegates had a requirement to read data in this format. First and foremost with binary data, you need to understand what you're looking to read ...
4441Reading command line parameters in Python
The sys module in Python gives you access to operating system parameters such as the command line interface, via an ordered collection (I think a list, may be a tuple) called argv. Although many / most users these days don't use the command line directly, it's often used internally between programs in ...
4086Cacheing class for Python - using a local SQLite database as a key/value store
Question from Tom: What did you have for lunch yesterday? Answer: A Sandwich, a piece of cake and some fruit. Question from Dick: What did you have for lunch yesterday? Answer: A Sandwich, a piece of cake and some fruit. Question from Harry: What did you have for lunch yesterday? Answer: A Sandwich, ...
4085JSON from Python - first principles, easy example
Here's a short example of how to pick up a JSON feed from a URL in Python. All the examples I came across looked very complicated, so I thought I would write one that's really straightforward: Open a remote URL feed that provides a JSON object:   response = urllib2.urlopen('http://www.wellho.net/services/pix.json') Read ...
2020Learning Python - many new example programs
I ran a public Python course earlier this week ... and (as I usually do!) wrote a number of short examples during the class to show the delegates not only how something is done, but also how the coding process works and how the particular answers are developed. I can't show you that process here on ...
3479Practical Extraction and Reporting - using Python and Extreme Programming
"We seem to be getting a lot of signups from Germany" - so said my fellow administrator on the First Great Western Coffee Shop forum. At first glance is something of a surprise, as this forum is "provided by a First Great Western Customer, for First Great Western customers" and First Great Western run ...
3465How can I do an FTP transfer in Python?
"If you think someone's probably done it before, they probably have .... and it's probably available to you" A good answer to many questions of the form "can I do xxxxx in Python?" Question today "can I do an FTP transfer from Python" Answer "Yes" [but I had a look around and discovered there was on ...
3442A demonstration of how many Python facilities work together
Many of our demonstrations on the Well House Consultants site show individual features of a language - taken in isolaion to show you how they work. However, during a course we usually write further examples to show you how features work in combination to give a total result / solution to an application. On ...
2931Syncronise - software, trains, and buses. Please!
To get from my home to the Divisional Police HQ on another side of Melksham, I can take a five minute bus ride on the X72 or 272, change at the Market Place onto the 234 or X34, and ride for another five minutes. So for a meeting at 19:00, I can catch a bus just after 18:00 to be there in good time, ...
2890Dates and times in Python
Python comes with a great variety of standard classes - including some very neat ones to handle dates and times. [Here] is a link to an example written on last week's Python course which took a couple of dates as strings, split them down and proceeded with date arithmetic. I always have to marvel at ...
2506Good example of recursion in Python - analyse an RSS feed
I'm not keen on recursive code - code that calls itself. Very often, such code is elegant in a way, yet so 'clever' that it is hard to follow. There are, however, exceptions where I say "THAT is a good use of recursion". Once such is in the handling / parsing of RSS (Really Simple Syndication) feeds. I ...
Examples from our training material
avx   Command Line Parameters
butter   Regular Expressions
dates   Date and Time - short example
fgrab   FTP transfers
imgsize   interpretting binary data
jdemo3   finding a specifically keyed within json structure
jflow.json   Data for jdemo3
jones   Random - really and replay
pyjson   Using our JSON service from Python
pyjson_with_cache   Using our JSON service from Python with cache
xz   Day of week, month of year names and locales
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 [here].
Topics covered in this module
Built in objects.
Standard modules.
time, re, unittest etc.
The Vaults of Parnassus and the Cheeseshop.
Sourceforge and other sources.
wx, tkinter, qt.
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 Ruby, Lua, 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.

You can Add a comment or ranking to this page

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

PAGE: http://www.wellho.net/resources/Y117.html • PAGE BUILT: Sun Oct 11 14:50:09 2020 • BUILD SYSTEM: JelliaJamb