Changes between Version 20 and Version 21 of PythonGuidelines


Ignore:
Timestamp:
Dec 20, 2010 9:48:25 AM (11 years ago)
Author:
Adam Roben
Comment:

Update after r74301

Legend:

Unmodified
Added
Removed
Modified
  • PythonGuidelines

    v20 v21  
    88
    99 * WebKit's Python scripts require Python 2.5 or higher to run.
    10  * [http://trac.webkit.org/browser/trunk/WebKitTools/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:
     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:
    1111{{{
    12 find WebKitTools/Scripts -wholename '*.pyc' | xargs rm
     12find Tools/Scripts -wholename '*.pyc' | xargs rm
    1313}}}
    1414
    1515== Code Structure ==
    1616
    17  * Most of the Python code is in [http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy WebKitTools/Scripts/webkitpy].
    18  * [http://trac.webkit.org/browser/trunk/WebKitTools/Scripts WebKitTools/Scripts] also contains end-user Python scripts (which usually import from webkitpy).
    19  * Code is written to assume that `.../WebKitTools/Scripts` is in your `PYTHONPATH`. `test-webkitpy` handles this internally, but you may find it useful to add the setting to your environment.
     17 * Most of the Python code is in [http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy Tools/Scripts/webkitpy].
     18 * [http://trac.webkit.org/browser/trunk/Tools/Scripts Tools/Scripts] also contains end-user Python scripts (which usually import from webkitpy).
     19 * Code is written to assume that `.../Tools/Scripts` is in your `PYTHONPATH`. `test-webkitpy` handles this internally, but you may find it useful to add the setting to your environment.
    2020 * Generally, we try to keep as much of the Python code in webkitpy as possible since this allows the code to be organized more nicely (for unit tests to be in companion files, etc).
    2121 * 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.
    22  * The root-level folders in webkitpy/ generally correspond to end-user scripts in WebKitTools/Scripts.  For example--
     22 * The root-level folders in webkitpy/ generally correspond to end-user scripts in Tools/Scripts.  For example--
    2323  * check-webkit-style -> webkitpy/style/
    2424  * new-run-webkit-tests -> webkitpy/layout_tests/
     
    2727  * webkitpy/common/: code shared by multiple root folders
    2828  * webkitpy/python24/: code that needs to work under Python 2.4 (currently just the version-checking code)
    29   * [http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy webkitpy/thirdparty/]: all third-party code in webkitpy
     29  * [http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy webkitpy/thirdparty/]: all third-party code in webkitpy
    3030
    3131== Strings and Unicode ==