Changes between Version 1 and Version 2 of PythonGuidelines


Ignore:
Timestamp:
Mar 7, 2010 5:02:36 PM (14 years ago)
Author:
Chris Jerdonek
Comment:

Minor updates. Added a FIXME to include upgrade instructions.

Legend:

Unmodified
Added
Removed
Modified
  • PythonGuidelines

    v1 v2  
    55 * Most of the Python code is in [http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy WebKitTools/Scripts/webkitpy].
    66 * [http://trac.webkit.org/browser/trunk/WebKitTools/Scripts WebKitTools/Scripts] also contains some Python code in the form of end-user scripts.  Generally, we try to keep as much of the code in webkitpy as possible since this allows the code to be organized more nicely, for unit tests to be in companion files, etc.
    7  * Unit test files are in correspondence with modules.  A unit test module has the name module_unittest.py, if module.py is the name of the module.
     7 * Unit test files are in correspondence with modules.  For example, if module.py is the name of a module, its unit test file would be module_unittest.py and would lie in the same directory.
    88 * Informally, we try to follow [http://www.python.org/dev/peps/pep-0008/ PEP8].
    99 * We put all third-party Python code in [http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy webkitpy/thirdparty].
    1010 * [http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/test-webkitpy Scripts/test-webkitpy] unit tests the Python code.
    11  * WebKit uses Python 2.4.
     11 * Most of WebKit's Python scripts require Python 2.5 to run.
     12
     13== Upgrading Python ==
     14
     15FIXME: fill in this section.
    1216
    1317== Mac OS X Snow Leopard ==
     18
     19(This section may not be necessary.  WebKit is still discussing what Python versions we need to support.)
    1420
    1521Python 2.4 is not officially installed or supported on Snow Leopard (Mac OS X 10.6).  Because of this, you may need to install Python 2.4 yourself.  After installing [http://guide.macports.org/ MacPorts], you should be able to install Python 2.4 and python_select as follows (roughly).  python_select allows you to quickly go back and forth between Python versions: