User Tools

Site Tools


dev:python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:python [2016/03/11 12:33] oschuettdev:python [2020/08/21 10:15] (current) – external edit 127.0.0.1
Line 6: Line 6:
 All python scripts should support self-testing. This means that the script can be invoked with ''%%--selftest%%'' as its sole argument.  All python scripts should support self-testing. This means that the script can be invoked with ''%%--selftest%%'' as its sole argument. 
  
-Ideally, a script's self-test consists of an exhaustive suite of unit-test. At the very least, it should not crash or break anything. Even an empty self-test will still reveal syntax and import errors, which are the most common Python 3 compatibility issues.+Ideally, a script's self-test consists of an exhaustive suite of unit-tests. At the very least, it should not crash or break anything. Even an empty self-test will still reveal syntax and import errors, which are the most common Python 3 compatibility issues.
  
 Once per night all Python executable are [[https://dashboard.cp2k.org/archive/python/index.html|self-tested automatically]]. Once per night all Python executable are [[https://dashboard.cp2k.org/archive/python/index.html|self-tested automatically]].
Line 12: Line 12:
 ===== Language Versions ===== ===== Language Versions =====
  
-All scripts should work with **Python 2.7 or later**. In particular the script should also work with Python 3.x . +All scripts should work with **Python 2.7 or later**. In particular the scripts should be future-proof and also work with Python 3.x . 
 Additionally, a small set of //essential scripts// should work with Python 2.4 as well. Essential scripts are those required for building CP2K plus ''prettify.py'' and ''instantiateTemplates.py''. Additionally, a small set of //essential scripts// should work with Python 2.4 as well. Essential scripts are those required for building CP2K plus ''prettify.py'' and ''instantiateTemplates.py''.
  
dev/python.1457699604.txt.gz · Last modified: 2020/08/21 10:14 (external edit)