| |||||||||||
| |||||||||||
Pieces 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 = 16If you want to have various bits of code running at the same time you can use piping, or you can use threads, or you can use a client / server system via TCP/IP. We have an example of Python threading and a python tcp/ip client and a simple python server all available on this web site. Piping is especially useful if you're containing / running an outside process on your machine, threads are useful where you're processing the same type of data in parallel many times over, and a client / server architecture is ideally suited to a logger and display application, with a server logging and one or more client, perhaps on remote computers, displaying. The wxPython module provides an excellent GUI - in other words an excellent way to provide a user interface on the front of your Python code. However, there's a lack of good worked learning examples. I've just added more source code examples - linkable from our wxPython training course module. These examples were originally based on other published code, but have been extensively rearranged for clarity and commented. The super call only works on new style classes!. If you try to use "super" on old syle classes, you'll be told " TypeError: super() argument 1 must be type, not instance".Old style classes ... # old style classesNew style classes ... # new style classesWhat are new style classes? .... they're classes that are derived, directly or indirectly, from built in classes and they've been around since Python 2.2. As well as super, other new features include the ability to define static and class methods, rather than just a method in the same namespace. more details (external link) We offer Python training courses. If you've just one or two people to be trained, our public courses which run every 2 or 3 months are going to be best value. For slightly larger groups, we'll run a private course at our centre. With 6 or more delegates all wanting to learn the same material at the same time, we'll come to you - you just provide a room and the students, we do the rest! (written 2006-10-23 04:13:29) Associated topics are indexed under Y202 - Python on the WebY302 - Python - Threads - What why and how Y108 - Python - String Handling Y112 - Python - Objects - Intermediate Y207 - wxPython
Some other Articles
Browser -> httpd -> Tomcat -> MySQL. Restarting.A commitment we won't be making Not proud to be British Of course I'll tell you by email Pieces of Python Brand new hotel and training centre, Melksham Python - listing out the contents of all variables Python - function v method Python - extend v append on a list Courses at Well House Manor 1638 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 at 50 posts per pageThis 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). |
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho | |||||||||||