Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 2to3: it comes with the Python distribution, and it will attempt to convert 2.x source code into 3, but it may not generate code which is compatible with both.
  • Can I Use Python 3: This script takes in a set of dependencies and then figures out which of them are holding you up from porting to Python 3.
  • Six: a Python 2 and 3 compatibility library. It provides utility functions for smoothing over the differences between the Python versions with the goal of writing Python code that is compatible on both Python versions. See also nine,  which turns six upside down. You write your code using Python 3 idioms – as much as possible –, and it is the Python 2 “version” that is patched.
  • Supporting Python 3: An in-depth guide is a free, open source eBook that guides you through the process of adding Python 3 support, from choosing a strategy to solving your distribution issues. Using plenty of code examples, it guides you across the hurdles and shows you the new Python features.

...

For sustainability and maintainability reasons, some extra modules available in Python 2 may not be installed in the Python 3. If you need a module that is missing, please consider if you can use it through a virtual environment. This is particularly recommended if the module is being evaluated or tested, or if it's not going to be used widely at the centre. If in doubt, please get in touch with servicedesk@ecmwfusing the ECMWF Support Portal at https://support.ecmwf.int

Show If
groupecmwf

You may use the Python chat room to discuss any Python matter with your fellow Python enthusiasts.

...