Changes between Version 5 and Version 6 of PythonGuidelines
- Timestamp:
- Mar 25, 2010, 7:14:20 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PythonGuidelines
v5 v6 1 1 = WebKit Python Guidelines and Tips = 2 2 3 Hereis an overview of WebKit's use of Python.3 Below is an overview of WebKit's use of Python. 4 4 5 5 == Basics == … … 8 8 * Informally, we try to follow [http://www.python.org/dev/peps/pep-0008/ PEP8]. Eventually we may make this official. 9 9 * [http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/test-webkitpy Scripts/test-webkitpy] unit tests the Python code. 10 * You can always delete any *.pyc files to make sure you are not mistakenly using the wrong file. This is often cosmetic and should usually not be necessary. 10 11 11 == Code Structure == 12 12 … … 23 23 * webkitpy/python24/: code that needs to work under Python 2.4 (currently just the version-checking code) 24 24 * [http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy webkitpy/thirdparty/]: all third-party code in webkitpy 25 26 == Tips == 27 28 * You can use the following command to clean leftover *.pyc files after a batch of file moves. 29 {{{ 30 find WebKitTools/Scripts -wholename '*.pyc' | xargs rm 31 }}} 32 This should usually not be necessary, but it ensures that you are not mistakenly using a wrong file since *.pyc files without a *.py file can still get executed. Incidentally, we try to use fully-qualified import statements throughout our code so that the location of modules in webkitpy/ is never be ambiguous. 25 33 26 34 == Installing a new version of Python ==