Changes between Version 9 and Version 10 of PythonGuidelines


Ignore:
Timestamp:
Mar 31, 2010 10:54:19 AM (14 years ago)
Author:
Chris Jerdonek
Comment:

Eliminated the Tips section

Legend:

Unmodified
Added
Removed
Modified
  • PythonGuidelines

    v9 v10  
    99 * Most of WebKit's Python scripts require Python 2.5 to run.
    1010 * Informally, we try to follow [http://www.python.org/dev/peps/pep-0008/ PEP8].  Eventually we may make this official.
    11  * [http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/test-webkitpy Scripts/test-webkitpy] unit tests the Python code.
     11 * [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:
     12{{{
     13find WebKitTools/Scripts -wholename '*.pyc' | xargs rm
     14}}}
    1215
    1316== Code Structure ==
     
    2528  * webkitpy/python24/: code that needs to work under Python 2.4 (currently just the version-checking code)
    2629  * [http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy webkitpy/thirdparty/]: all third-party code in webkitpy
    27 
    28 == Tips ==
    29 
    30  * You can use the following command to clean leftover *.pyc files after a batch of file moves.
    31 {{{
    32 find WebKitTools/Scripts -wholename '*.pyc' | xargs rm
    33 }}}
    34  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.
    3530
    3631== Upgrading from Python 2.3 or Python 2.4 ==