Changes between Version 21 and Version 22 of PythonGuidelines
- Timestamp:
- Mar 19, 2012, 4:14:13 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PythonGuidelines
v21 v22 7 7 == Basics == 8 8 9 * WebKit's Python scripts require Python 2. 5or higher to run.9 * WebKit's Python scripts require Python 2.6 or higher to run. 10 10 * [http://trac.webkit.org/browser/trunk/Tools/Scripts/test-webkitpy Scripts/test-webkitpy] unit tests the Python code. It also cleans orphan *.pyc files from webkitpy (i.e. .pyc files without a corresponding .py file). You can also do this manually (for all *.pyc files in webkitpy) using the following command: 11 11 {{{ … … 106 106 python_select -l 107 107 }}} 108 109 == Consequences of not using Python 2.6 ==110 111 Below is a list of some consequences of not using Python 2.6 (and things we should revisit in our code base should we ever upgrade to 2.6):112 113 * We can't use os.path.relpath(): [http://docs.python.org/library/os.path.html#os.path.relpath]114 * We can't use ZipFile.extractall(): [http://docs.python.org/library/zipfile.html#zipfile.ZipFile.extractall]115 * We need to use an import statement to use the "with" keyword: http://docs.python.org/whatsnew/2.5.html#pep-343-the-with-statement