Changes between Version 2 and Version 3 of PythonGuidelines
- Timestamp:
- Mar 8, 2010, 2:54:07 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PythonGuidelines
v2 v3 11 11 * Most of WebKit's Python scripts require Python 2.5 to run. 12 12 13 == UpgradingPython ==13 == Installing a new version of Python == 14 14 15 FIXME: fill in this section. 15 [Most of these instructions are Mac-specific.] 16 16 17 == Mac OS X Snow Leopard == 17 You can tell what version of Python you are currently using by typing-- 18 {{{ 19 python -V 20 }}} 18 21 19 (This section may not be necessary. WebKit is still discussing what Python versions we need to support.) 22 Before trying to install a new version, check whether your machine already has other versions installed. From a Mac, you can try reading the man page-- 23 {{{ 24 man python 25 }}} 26 On Snow Leopard you will find that your machine comes with Python 2.5, 2.6, and 3.0. The man page also provides instructions on how to switch your system between these system-installed versions. 20 27 21 Python 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: 28 If you need to install a new version not on your machine, you can use [http://guide.macports.org/ MacPorts] to do this. MacPorts allows you to install Python versions alongside your system versions without interfering with them. After installing MacPorts, simply type (for example)-- 29 {{{ 30 sudo port install python26 31 }}} 32 We recommend that Tiger users with 2.3 install Python 2.6 for starters. 22 33 23 * Type `sudo port install python24` 24 * Type `sudo port install python_select` 25 * Then you should be able to type select Python 2.4 using, for example,`sudo python_select python24`. 26 * Use `python_select -l` to find out what versions are available on your machine. 34 You should probably also install python_select using MacPorts-- 35 {{{ 36 sudo port install python_select 37 }}} 27 38 39 The python_select command allows you to quickly go back and forth between Python versions, like so-- 40 {{{ 41 > python -V 42 Python 2.6.4 43 > sudo python_select python24 44 Selecting version "python24" for python 45 > python -V 46 Python 2.4.6 47 }}} 48 49 To find out what versions of Python you can switch to using python_select, type-- 50 {{{ 51 python_select -l 52 }}} 53 54