Skip to content

Commit 12a9eee

Browse files
author
Kenneth Reitz
committed
Merge pull request realpython#284 from kuyan/master
Grammar, capitalization fixes
2 parents 4ea40a4 + b685826 commit 12a9eee

File tree

7 files changed

+52
-37
lines changed

7 files changed

+52
-37
lines changed

docs/dev/env.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ VIM
1414

1515
Vim is a text editor which uses keyboard shortcuts for editing instead of menus
1616
or icons. There exist a couple of plugins and settings for the VIM editor to
17-
aid python development. If you only develop in Python, a good start is to set
17+
aid Python development. If you only develop in Python, a good start is to set
1818
the default settings for indentation and line-wrapping to values compliant with
1919
`PEP 8 <http://www.python.org/dev/peps/pep-0008/>`_. In your home directory,
2020
open a file called `.vimrc` and add the following lines:::
@@ -29,7 +29,7 @@ open a file called `.vimrc` and add the following lines:::
2929

3030
With these settings, newlines are inserted after 79 characters and indentation
3131
is set to 4 spaces per tab. If you also use VIM for other languages, there is a
32-
handy plugin at indent_, which handles indentation settings for python source
32+
handy plugin at indent_, which handles indentation settings for Python source
3333
files.
3434

3535
There is also a handy syntax plugin at syntax_ featuring some improvements over
@@ -67,12 +67,12 @@ Python-mode
6767
Python-mode_ is a complex solution in VIM for working with python code.
6868
It has:
6969

70-
- Async python code checking (pylint, pyflakes, pep8, mccabe) in any combination
70+
- Asynchronous Python code checking (pylint, pyflakes, pep8, mccabe) in any combination
7171
- Code refactoring and autocompletion with Rope
72-
- Fast python folding
72+
- Fast Python folding
7373
- Virtualenv support
74-
- Search by python documentation and run python code
75-
- Auto pep8 error fixes
74+
- Search by Python documentation and run Python code
75+
- Auto PEP8 error fixes
7676

7777
And more.
7878

@@ -148,7 +148,7 @@ Spyder
148148
------
149149

150150
`Spyder <http://code.google.com/p/spyderlib/>`_ is an IDE specifically geared
151-
toward working with scientific python libraries (namely `Scipy <http://www.scipy.org/>`_).
151+
toward working with scientific Python libraries (namely `Scipy <http://www.scipy.org/>`_).
152152
It includes integration with pyflakes_, `pylint <http://www.logilab.org/857>`_,
153153
and `rope <http://rope.sourceforge.net/>`_.
154154

@@ -159,7 +159,7 @@ class and function browser, and object inspection.
159159
WingIDE
160160
-------
161161

162-
`WingIDE <http://wingware.com/>`_ is a python specific IDE. It runs on Linux,
162+
`WingIDE <http://wingware.com/>`_ is a Python specific IDE. It runs on Linux,
163163
Windows, and Mac (as an X11 application, which frustrates some Mac users).
164164

165165
WingIDE offers code completion, syntax highlighting, source browser, graphical

docs/scenarios/admin.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ Systems Administration
44
Fabric
55
------
66

7-
`Fabric <http://docs.fabfile.org>`_ is a library for simplifying system administration tasks. While Chef
8-
and Puppet tend to focus on managing servers and system libraries,
9-
fabric is more focused on application level tasks such as deployment.
7+
`Fabric <http://docs.fabfile.org>`_ is a library for simplifying system
8+
administration tasks. While Chef and Puppet tend to focus on managing servers
9+
and system libraries, fabric is more focused on application level tasks such
10+
as deployment.
1011

1112
Install Fabric:
1213

13-
.. code-block:: bash
14+
.. code-block:: console
1415
1516
$ pip install fabric
1617
@@ -40,7 +41,7 @@ server.
4041
With the previous code saved in a file named fabfile.py, we can check memory
4142
usage with:
4243

43-
.. code-block:: bash
44+
.. code-block:: console
4445
4546
$ fab memory_usage
4647
[my_server1] Executing task 'memory'
@@ -59,7 +60,7 @@ usage with:
5960
6061
and we can deploy with:
6162

62-
.. code-block:: bash
63+
.. code-block:: console
6364
6465
$ fab deploy
6566
@@ -78,7 +79,7 @@ multiple servers using simple template files.
7879

7980
Salt supports python versions 2.6 and 2.7 and can be installed via pip:
8081

81-
.. code-block:: bash
82+
.. code-block:: console
8283
8384
$ pip install salt
8485
@@ -87,7 +88,7 @@ shell commands or use pre-built modules of complex commands on our minions.
8788

8889
The following command lists all available minion hosts, using the ping module.
8990

90-
.. code-block:: bash
91+
.. code-block:: console
9192
9293
$ salt '*' test.ping
9394
@@ -98,7 +99,7 @@ provide a host taxonomy for the salt modules.
9899

99100
The following command lists all available minions running CentOS using the grains system:
100101

101-
.. code-block:: bash
102+
.. code-block:: console
102103
103104
$ salt -G 'os:CentOS' test.ping
104105

docs/scenarios/gui.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,18 @@ PyObjC
2929

3030
wxPython
3131
--------
32-
wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a Python extension module (native code) that wraps the popular wxWidgets cross platform GUI library, which is written in C++.
32+
wxPython is a GUI toolkit for the Python programming language. It allows
33+
Python programmers to create programs with a robust, highly functional
34+
graphical user interface, simply and easily. It is implemented as a Python
35+
extension module (native code) that wraps the popular wxWidgets cross platform
36+
GUI library, which is written in C++.
3337

3438
Install (Stable)
3539
~~~~~~~~~~~~~~~~
3640
*Go to http://www.wxpython.org/download.php#stable and download the appropriate
3741
package for your OS.*
3842

39-
Gtk
43+
GTk
4044
---
4145
PyGTK provides Python bindings for the GTK+ toolkit. Like the GTK+ library
4246
itself, it is currently licensed under the GNU LGPL. It is worth noting that
@@ -60,10 +64,15 @@ available on the `Python Wiki <http://wiki.python.org/moin/TkInter>`_.
6064

6165
Kivy
6266
----
63-
`Kivy <http://kivy.org>`_ is a Python library for development of multi-touch enabled media rich applications. The aim is to allow for quick and easy interaction design and rapid prototyping, while making your code reusable and deployable.
67+
`Kivy <http://kivy.org>`_ is a Python library for development of multi-touch
68+
enabled media rich applications. The aim is to allow for quick and easy
69+
interaction design and rapid prototyping, while making your code reusable
70+
and deployable.
6471

65-
Kivy is written in Python, based on OpenGL and supports different input devices such as: Mouse, Dual Mouse, TUIO, WiiMote, WM_TOUCH, HIDtouch, Apple's products and so on.
72+
Kivy is written in Python, based on OpenGL and supports different input devices
73+
such as: Mouse, Dual Mouse, TUIO, WiiMote, WM_TOUCH, HIDtouch, Apple's products and so on.
6674

67-
Kivy is actively being developed by a community and free to use. It operates on all major platforms (Linux, OSX, Windows, Android).
75+
Kivy is actively being developed by a community and free to use. It operates
76+
on all major platforms (Linux, OSX, Windows, Android).
6877

6978
The main resource for information is the website: http://kivy.org

docs/scenarios/network.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Networking
44
Twisted
55
-------
66

7-
`Twisted <http://twistedmatrix.com/trac/>`_ is an event-driven networking engine. It can be
8-
used to build applications around many different networking protocols, including http servers
9-
and clients, applications using SMTP, POP3, IMAP or SSH protocols, instant messaging and
10-
`many more <http://twistedmatrix.com/trac/wiki/Documentation>`_.
7+
`Twisted <http://twistedmatrix.com/trac/>`_ is an event-driven networking
8+
engine. It can be used to build applications around many different networking
9+
protocols, including http servers and clients, applications using SMTP, POP3,
10+
IMAP or SSH protocols, instant messaging and `much more <http://twistedmatrix.com/trac/wiki/Documentation>`_.
1111

1212
PyZMQ
1313
-----

docs/starting/install/osx.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ by downloading `XCode <http://developer.apple.com/xcode/>`_, the smaller
2626
Apple account) or the even smaller `OSX-GCC-Installer <https://github.com/kennethreitz/osx-gcc-installer#readme>`_
2727
package.
2828

29+
.. note::
30+
If you already have XCode installed, do not install OSX-GCC-Installer.
31+
In combination, the software can cause issues that are difficult to
32+
diagnose.
33+
2934
While Lion comes with a large number of UNIX utilities, those familiar with
3035
Linux systems will notice one key component missing: a decent package manager.
3136
`Homebrew <http://mxcl.github.com/homebrew/>`_ fills this void.

docs/starting/which-python.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ level of compatibility with Python packages and C extension modules.
4747

4848
If you are writing open-source Python code and want to reach the widest possible
4949
audience, targeting CPython is your best bet. If you need to use any packages
50-
that rely on C extensions for their functionality (eg: numpy) then CPython
50+
that rely on C extensions for their functionality (e.g. numpy) then CPython
5151
is your only choice.
5252

5353
Being the reference implementation, all versions of the Python language are
54-
available as CPython. Python 3 is only available in a CPython implementation.
54+
available as CPython. Python 3 is only available as a CPython implementation.
5555

5656
PyPy
5757
----
@@ -73,14 +73,14 @@ Jython
7373
------
7474

7575
`Jython <http://www.jython.org/>`_ is a Python implementation that compiles
76-
Python code to Java byte code that then executes on a JVM. It has the additional
77-
advantage of being able to import and use any Java class the same as a Python
76+
Python code to Java byte code that is then executed in a JVM. It has the additional
77+
advantage of being able to import and use any Java class like a Python
7878
module.
7979

8080
If you need to interface with an existing Java codebase or have other reasons to
8181
need to write Python code for the JVM, Jython is the best choice.
8282

83-
Currently Jython supports up to Python 2.5. [#jython_ver]_
83+
Jython currently supports up to Python 2.5. [#jython_ver]_
8484

8585
IronPython
8686
----------
@@ -90,7 +90,7 @@ framework. It can use both Python and .NET framework libraries, and can also
9090
expose Python code to other .NET languages.
9191

9292
`Python Tools for Visual Studio <http://ironpython.net/tools/>`_ integrates
93-
IronPython directly in to the Visual Studio development environment, making it
93+
IronPython directly into the Visual Studio development environment, making it
9494
an ideal choice for Windows developers.
9595

9696
IronPython supports Python 2.7. [#iron_ver]_

docs/writing/gotchas.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ Common Gotchas
22
==============
33

44
For the most part, Python aims to be a clean and consistent language that
5-
avoids surprises, but there are a few cases where newcomers to the language
6-
often get tripped up.
5+
avoids surprises. However, there are a few cases that can be confusing to
6+
newcomers.
77

8-
Some of these are intentional but potentially surprising. Some could arguably
9-
be considered language warts. In general though, what follows is a collection
8+
Some of these cases are intentional but can be potentially surprising. Some
9+
could arguably be considered language warts. In general though, what follows is a collection
1010
of potentially tricky behavior that might seem strange at first glance, but is
1111
generally sensible once you're aware of the underlying cause for the surprise.
1212

@@ -157,7 +157,7 @@ What You Should Do Instead
157157
~~~~~~~~~~~~~~~~~~~~~~~~~~
158158

159159
The most general solution is arguably a bit of a hack. Due to Python's
160-
afformentioned behavior concerning evaluating default arguments to functions
160+
aforementioned behavior concerning evaluating default arguments to functions
161161
(see :ref:`default_args`), you can create a closure that binds immediately to
162162
its arguments by using a default arg like so:
163163

0 commit comments

Comments
 (0)