Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - 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))
Python - current versions and implementations (CPython, Jython, IronPython etc)

Versions

Python originated in 1988, I am told.

Think back to decisions YOU made in 1988, and they may have been good ones at the time. But it's likely that a good decision such as "which camera would I buy" made NOW would come up with the same model. And it's the same thing with programming languages too. Python is much better than other languages in this respect. Because it started out with a simple and forward looking framework, its issues as regards modernity are not great, and it's far more fine adjustments that rewrites of the core that are needed. It's been good for coming up for 25 years, but a few tweaks are needed (and have been applied) to make it good for the next 25 years too. And a few of those do lead to changes in the source code - "incompatibilities" you may call them, although tools are provide to help in the transition.

Python 2.0i originated in 2000. Versions have moved up 2.1, 2.2 etc to 2.7, with sub-releases such as 2.7.1 and 2.7.2

During the life of Python 2, features and facilities have been added such as generators, new style classes and decorators (the full list would be a long one). Some elements have been deprecated - i.e. they remain, but their use is no longer encouraged and you're given fair warning that they'll be removed at a future date.

Python 3.0 was released at the end of 2008. Version have moved up 3.1 and 3.2, with sub-releases such as 3.2.1

Python 3 is not an instant replacement for Python 2. Some deprecated elements have been removed, and some features have been moved around / renamed / redesigned to reflect changes 20 years on from the original Python. And that means that the program sources is not compatible. Which is to be regretted in the short term, but applauded in the longer term. And a utility - "2to3" is provided to help you.

The switch from Python 2 to Python 3 by users will be a slow one. There are so many modules written using Python 2 that need to be converted, and with things like numpy that's major work, I understand. And there are so many computers out there, so many distributions loaded with Python 2 that it would be a very brave author of an open source product that specified "Python 3" for quite a long time. So we're seeing a gentle drift rather than a calamitous switchover. Indeed, Python 2.7 was a new release of Python along the "2" track long after Python 3.0, so the Python folks themselves are in total support of this gentle drift.

Implementations

Python runs on many platforms. Implemented internally in the C language, it's a standard part of Linux. You'll find it as standard in virtually every modern Unix too, such as Mac OS X, and it's freely and easily available (but not supplied as standard) with Windows operating systems from Microsoft. This version is sometimes referred to as CPython

Both source code and internal binary code can be transferred between systems / operating systems with ease for the most part - indeed, I'm happy to teach Python to a mixed classroom running Windows, Unix and Linux systems. The biggest differences relate to the environment on the computers - which editors to use, and where the Python 'interpreter' is located. Code wise, the following should be noted:

a) If you call a method to say "go run this operating system command", you had better be running your Python on a computer that supports the command

b) Methods in the os and os.path modules may be called cross-platform, but the modules themselves (os.pyc and friends) have to be implemented on a system by system basis; this is how Python provides the ability to support things on different operating systems as far as the regular programmer is concerned

An open source-download - "py2exe" - provides the tools that allow you to bundle all the necessary Python components into a single file with your own program, so that you can distribute Python executables on Windows systems without having to ensure that Python's also installed on the target computers.

Jython (formerly JPython) is an implementation of Python to run on the Java Platform (Java Virtual Machine). It consists of a compiler to compile Python source code down to Java bytecodes which can run directly on a JVM, a set of support libraries which are used by the compiled Java bytecodes, and extra support to make it trivial to use Java packages from within Jython.

There are a number of differences between Python and Jython . First, Jython programs cannot currently use CPython extension modules written in C. These modules usually have files with the extension .so, .pyd or .dll. If you want to use such a module, you should look for an equivalent written in pure Python or Java. This may be fixed in a future release, but there are a number of other differences between the two implementations that are unlikely to go away. These range from the trivial - Jython's code objects currently do not have a co_code attribute because it is not possible to directly access Java bytecode from a class, without loading the file; to the significant - Jython uses Java's true garbage collection rather than Python's reference counting scheme.

IronPython is an open-source implementation of the Python programming language which is tightly integrated with Microsoft's .NET Framework. IronPython can use the .NET Framework and Python libraries, and other .NET languages can use Python code just as easily. IronPython is an excellent addition to the .NET Framework, providing Python developers with the power of the .NET framework. Existing .NET developers can also use IronPython as a fast and expressive scripting language for embedding, testing, or writing a new application from scratch. The .NET framework (base class library, presentation foundation, Silverlight, etc.) gives developers a large amount of functionality and power.




I've spent today writing an update to our training materials on Python - a fresh lick of paint, if you will - and the thing that changes the most with any good language is the versions and implementations. I fully expect the above comments to look old very much more quickly than Python code looks old!

The full (new) "fast start" module - for use on private courses where the delegates are all old hands, but just not at programming, may be found [here].

I've also added a new module on calling functions and methods in modules and packages - that's [here]. Previously, we've taught our delegates how to write functions and methods in the same module as we've taught them how to use such named pieces of code. However, the courses (and this applies to public courses too) are now going to encourage delegates to make early use of existing functionality provided with Python in a much more forceful way!
(written 2011-11-13, updated 2011-11-27)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
Y199 - Python - Fast Start
  [2017] Python - a truly dynamic language - (2009-01-30)
  [4707] Some gems from an introduction to Python - (2016-10-29)
  [4709] Some gems from Intermediate Python - (2016-10-30)
  [4712] A reminder of the key issues to consider in moving from Python 2 to Python 3 - (2016-10-30)
  [4713] Equality (in Python) - (2016-10-30)

Y050 - Python - General
  [16] Python training - (2004-08-16)
  [2020] Learning Python - many new example programs - (2009-01-31)
  [2227] Learning PHP, Ruby, Lua and Python - upcoming courses - (2009-06-11)
  [2285] Great new diagrams for our notes ... Python releases - (2009-07-13)
  [2367] Learning to program - how to jump the first hurdles - (2009-08-20)
  [2394] Two days of demonstration scripts in Python - (2009-09-05)
  [2504] Learning to program in ... - (2009-11-15)
  [2778] Learning to program in Python 2 ... and / or in Python 3 - (2010-05-24)
  [2822] Python training courses for use with ESRI ArcMap software - (2010-06-23)
  [3076] Python through the Snow - (2010-12-01)
  [3463] Busy weekend of contrasts. - (2011-10-03)
  [3489] Python courses and Private courses - gently updating our product to keep it ahead of the game - (2011-10-20)
  [3798] When you should use Object Orientation even in a short program - Python example - (2012-07-06)
  [3816] Want to escape the Olympics? Learn to program in the countryside! - (2012-07-23)
  [3902] Shell - Grep - Sed - Awk - Perl - Python - which to use when? - (2012-10-22)
  [3903] Python Programming class for delegates who have already self-taught the basics - (2012-10-25)
  [3911] How well do you know Perl and / or Python? - (2012-11-04)
  [3935] Whether you have programmed before or not, we can teach you Python - (2012-11-25)
  [4236] Using Python to analyse last years forum logs. Good coding practise discussion. - (2014-01-01)
  [4295] A longer Python ... training course - (2014-09-16)
  [4408] Additional Python courses added to our schedule - (2015-01-29)
  [4434] Public training courses - upcoming dates - (2015-02-21)
  [4558] Well House Consultants - Python courses / what's special. - (2015-10-28)
  [4656] Identifying the first and last records in a sequence - (2016-02-26)


Back to
Melksham House / Melksham Campus - Seniors Input Sought
Previous and next
or
Horse's mouth home
Forward to
Quintessentially English - scenes from our Wiltshire town
Some other Articles
When competition is not a good idea - Melksham Bus Absurdity
Networking - North and West Wilts FSB Style
Emergency First Aid at Work (HSE) training in Melksham - places available for 19.1.2012
Quintessentially English - scenes from our Wiltshire town
Python - current versions and implementations (CPython, Jython, IronPython etc)
Melksham House / Melksham Campus - Seniors Input Sought
Tags used in writing this blog
Regular Expression modifiers in PHP - summary table
PHP - moving from ereg to preg for regular expressions
Microblogging - what I should have tweeted in the last 48 hours
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., 2024: 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/mouth/3519_.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb