Skip to content

Commit 38d0e63

Browse files
committed
lines less than 80 chars in /starting/
1 parent 102f725 commit 38d0e63

File tree

5 files changed

+161
-43
lines changed

5 files changed

+161
-43
lines changed

docs/starting/install/linux.rst

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,29 @@ Installing Python on Linux
55

66
The latest version of Ubuntu, **comes with Python 2.7 out of the box**.
77

8-
You do not need to install or configure anything else to use Python. Having said that, I would strongly recommend that you install the tools and libraries described in the next section before you start building Python applications for real-world use. In particular, you should always install Distribute, as it makes it much easier for you to use other third-party Python libraries.
8+
You do not need to install or configure anything else to use Python. Having
9+
said that, I would strongly recommend that you install the tools and libraries
10+
described in the next section before you start building Python applications
11+
for real-world use. In particular, you should always install Distribute, as
12+
it makes it much easier for you to use other third-party Python libraries.
913

1014
Distribute & Pip
1115
----------------
1216

13-
The most crucial third-party Python software of all is Distribute, which extends the packaging and installation facilities provided by the distutils in the standard library. Once you add Distribute to your Python system you can download and install any compliant Python software product with a single command. It also enables you to add this network installation capability to your own Python software with very little work.
17+
The most crucial third-party Python software of all is Distribute, which
18+
extends the packaging and installation facilities provided by the distutils
19+
in the standard library. Once you add Distribute to your Python system you can
20+
download and install any compliant Python software product with a single
21+
command. It also enables you to add this network installation capability to
22+
your own Python software with very little work.
1423

15-
To obtain the latest version of Distribute for Linux, run the python script available here:
24+
To obtain the latest version of Distribute for Linux, run the python script
25+
available here:
1626
http://python-distribute.org/distribute_setup.py
1727

18-
The new``easy_install`` command you have available is considered by many to be deprecated, so we will install its replacement: **pip**. Pip allows for uninstallation of packages, and is actively maintained, unlike easy_install.
28+
The new``easy_install`` command you have available is considered by many to be
29+
deprecated, so we will install its replacement: **pip**. Pip allows for
30+
uninstallation of packages, and is actively maintained, unlike easy_install.
1931

2032
To install pip, simply open a command prompt and run::
2133

@@ -25,22 +37,38 @@ To install pip, simply open a command prompt and run::
2537
Virtualenv
2638
----------
2739

28-
After Distribute & Pip, the next development tool that you should install is `virtualenv <http://pypi.python.org/pypi/virtualenv/>`_. Use pip::
40+
After Distribute & Pip, the next development tool that you should install is
41+
`virtualenv <http://pypi.python.org/pypi/virtualenv/>`_. Use pip::
2942

3043
$ pip install virtualenv
3144

32-
The virtualenv kit provides the ability to create virtual Python environments that do not interfere with either each other, or the main Python installation. If you install virtualenv before you begin coding then you can get into the habit of using it to create completely clean Python environments for each project. This is particularly important for Web development, where each framework and application will have many dependencies.
45+
The virtualenv kit provides the ability to create virtual Python environments
46+
that do not interfere with either each other, or the main Python installation.
47+
If you install virtualenv before you begin coding then you can get into the
48+
habit of using it to create completely clean Python environments for each
49+
project. This is particularly important for Web development, where each
50+
framework and application will have many dependencies.
3351

34-
To set up a new Python environment, change the working directory to where ever you want to store the environment, and run the virtualenv utility in your project's directory::
52+
To set up a new Python environment, change the working directory to where ever
53+
you want to store the environment, and run the virtualenv utility in your
54+
project's directory::
3555

3656
$ virtualenv --distribute venv
3757

38-
To use an environment, run ``source venv/bin/activate``. Your command prompt will change to show the active environment. Once you have finished working in the current virtual environment, run ``deactivate`` to restore your settings to normal.
58+
To use an environment, run ``source venv/bin/activate``. Your command prompt
59+
will change to show the active environment. Once you have finished working in
60+
the current virtual environment, run ``deactivate`` to restore your settings
61+
to normal.
3962

40-
Each new environment automatically includes a copy of ``pip``, so that you can setup the third-party libraries and tools that you want to use in that environment. Put your own code within a subdirectory of the environment, however you wish. When you no longer need a particular environment, simply copy your code out of it, and then delete the main directory for the environment.
63+
Each new environment automatically includes a copy of ``pip``, so that you can
64+
setup the third-party libraries and tools that you want to use in that
65+
environment. Put your own code within a subdirectory of the environment,
66+
however you wish. When you no longer need a particular environment, simply
67+
copy your code out of it, and then delete the main directory for the environment.
4168

4269

4370
--------------------------------
4471

45-
This page is a remixed version of `another guide <http://www.stuartellis.eu/articles/python-development-windows/>`_, which is available under the same license.
72+
This page is a remixed version of `another guide <http://www.stuartellis.eu/articles/python-development-windows/>`_,
73+
which is available under the same license.
4674

docs/starting/install/osx.rst

Lines changed: 57 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,69 @@ Installing Python on Mac OS X
55

66
The latest version of Mac OS X, Lion, **comes with Python 2.7 out of the box**.
77

8-
You do not need to install or configure anything else to use Python. Having said that, I would strongly recommend that you install the tools and libraries described in the next section before you start building Python applications for real-world use. In particular, you should always install Distribute, as it makes it much easier for you to use other third-party Python libraries.
8+
You do not need to install or configure anything else to use Python. Having
9+
said that, I would strongly recommend that you install the tools and libraries
10+
described in the next section before you start building Python applications
11+
for real-world use. In particular, you should always install Distribute, as it
12+
makes it much easier for you to use other third-party Python libraries.
913

10-
The version of Python that ships with OS X is great for learning, but it's not good for development. It's slightly out of date, and Apple has made significant changes that can cause hidden bugs.
14+
The version of Python that ships with OS X is great for learning, but it's not
15+
good for development. It's slightly out of date, and Apple has made significant
16+
changes that can cause hidden bugs.
1117

1218
Doing it Right
1319
--------------
1420

1521
Let's install a real version of Python.
1622

17-
First, you'll need to have GCC installed to compile Python. You can either get this from `XCode <http://developer.apple.com/xcode/>`_ or the smaller `OSX-GCC-Installer <https://github.com/kennethreitz/osx-gcc-installer#readme>`_ package.
23+
First, you'll need to have GCC installed to compile Python. You can either get
24+
this from `XCode <http://developer.apple.com/xcode/>`_ or the smaller
25+
`OSX-GCC-Installer <https://github.com/kennethreitz/osx-gcc-installer#readme>`_ package.
1826

19-
While Lion comes with a large number of UNIX utilities, those familiar with Linux systems will notice one key component missing: a decent package manager. `Homebrew <http://mxcl.github.com/homebrew/>`_ fills this void.
27+
While Lion comes with a large number of UNIX utilities, those familiar with
28+
Linux systems will notice one key component missing: a decent package manager.
29+
`Homebrew <http://mxcl.github.com/homebrew/>`_ fills this void.
2030

21-
To `install Homebrew <https://github.com/mxcl/homebrew/wiki/installation>`_, simply run::
31+
To `install Homebrew <https://github.com/mxcl/homebrew/wiki/installation>`_,
32+
simply run::
2233

2334
$ ruby -e "$(curl -fsS https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
2435

25-
Then, insert the hombrew directory at the top of your ``PATH`` enviornment variable. You can do this by adding the following line at the bottom of your ``~/.bashrc`` file::
36+
Then, insert the hombrew directory at the top of your ``PATH`` enviornment
37+
variable. You can do this by adding the following line at the bottom of your
38+
``~/.bashrc`` file::
2639

2740
export PATH=/usr/local/bin:$PATH
2841

2942
Now, we can install Python 2.7: ::
3043

3144
$ brew install python --framework
3245

33-
This will take a minute or two. Once that's complete, you'll have to add the new Python scripts directory to your ``PATH``::
46+
This will take a minute or two. Once that's complete, you'll have to add the
47+
new Python scripts directory to your ``PATH``::
3448

3549
export PATH=/usr/local/share/python:$PATH
3650

37-
The ``--framework`` option tells Homebrew to compile a Framework-style Python build, rather than a UNIX-style build. The outdated version of Python that Snow Leopard comes packaged with is built as a Framework, so this helps avoid some future module installation bugs.
51+
The ``--framework`` option tells Homebrew to compile a Framework-style Python
52+
build, rather than a UNIX-style build. The outdated version of Python that
53+
Snow Leopard comes packaged with is built as a Framework, so this helps avoid
54+
some future module installation bugs.
3855

3956

4057
Distribute & Pip
4158
----------------
4259

43-
The most crucial third-party Python software of all is Distribute, which extends the packaging and installation facilities provided by the distutils in the standard library. Once you add Distribute to your Python system you can download and install any compliant Python software product with a single command. It also enables you to add this network installation capability to your own Python software with very little work.
60+
The most crucial third-party Python software of all is Distribute, which
61+
extends the packaging and installation facilities provided by the distutils
62+
in the standard library. Once you add Distribute to your Python system you can
63+
download and install any compliant Python software product with a single
64+
command. It also enables you to add this network installation capability to
65+
your own Python software with very little work.
4466

45-
Hombrew already installed Distribute for you. Its ``easy_install`` command is considered by many to be deprecated, so we will install its replacement: **pip**. Pip allows for uninstallation of packages, and is actively maintained, unlike easy_install.
67+
Hombrew already installed Distribute for you. Its ``easy_install`` command is
68+
considered by many to be deprecated, so we will install its replacement:
69+
**pip**. Pip allows for uninstallation of packages, and is actively maintained,
70+
unlike easy_install.
4671

4772
To install pip, simply open a command prompt and run::
4873

@@ -52,21 +77,37 @@ To install pip, simply open a command prompt and run::
5277
Virtualenv
5378
----------
5479

55-
After Distribute & Pip, the next development tool that you should install is `virtualenv <http://pypi.python.org/pypi/virtualenv/>`_. Use pip::
80+
After Distribute & Pip, the next development tool that you should install is
81+
`virtualenv <http://pypi.python.org/pypi/virtualenv/>`_. Use pip::
5682

5783
$ pip install virtualenv
5884

59-
The virtualenv kit provides the ability to create virtual Python environments that do not interfere with either each other, or the main Python installation. If you install virtualenv before you begin coding then you can get into the habit of using it to create completely clean Python environments for each project. This is particularly important for Web development, where each framework and application will have many dependencies.
85+
The virtualenv kit provides the ability to create virtual Python environments
86+
that do not interfere with either each other, or the main Python installation.
87+
If you install virtualenv before you begin coding then you can get into the
88+
habit of using it to create completely clean Python environments for each
89+
project. This is particularly important for Web development, where each
90+
framework and application will have many dependencies.
6091

61-
To set up a new Python environment, change the working directory to where ever you want to store the environment, and run the virtualenv utility in your project's directory::
92+
To set up a new Python environment, change the working directory to where ever
93+
you want to store the environment, and run the virtualenv utility in your
94+
project's directory::
6295

6396
$ virtualenv --distribute venv
6497

65-
To use an environment, run ``source venv/bin/activate``. Your command prompt will change to show the active environment. Once you have finished working in the current virtual environment, run ``deactivate`` to restore your settings to normal.
98+
To use an environment, run ``source venv/bin/activate``. Your command prompt
99+
will change to show the active environment. Once you have finished working in
100+
the current virtual environment, run ``deactivate`` to restore your settings
101+
to normal.
66102

67-
Each new environment automatically includes a copy of ``pip``, so that you can setup the third-party libraries and tools that you want to use in that environment. Put your own code within a subdirectory of the environment, however you wish. When you no longer need a particular environment, simply copy your code out of it, and then delete the main directory for the environment.
103+
Each new environment automatically includes a copy of ``pip``, so that you can
104+
setup the third-party libraries and tools that you want to use in that
105+
environment. Put your own code within a subdirectory of the environment,
106+
however you wish. When you no longer need a particular environment, simply
107+
copy your code out of it, and then delete the main directory for the environment.
68108

69109

70110
--------------------------------
71111

72-
This page is a remixed version of `another guide <http://www.stuartellis.eu/articles/python-development-windows/>`_, which is available under the same license.
112+
This page is a remixed version of `another guide <http://www.stuartellis.eu/articles/python-development-windows/>`_,
113+
which is available under the same license.

0 commit comments

Comments
 (0)