Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 705e90e

Browse files
authored
Merge branch 'master' into standard-american-english
2 parents a2555b9 + 9d975b5 commit 705e90e

17 files changed

+130
-123
lines changed

docs/contents.rst.inc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ New to Python? Let's properly setup up your Python environment:
3333
Python Development Environments
3434
-------------------------------
3535
36-
This part of the guide focus on the Python development environment,
36+
This part of the guide focuses on the Python development environment,
3737
and the best-practice tools that are available for writing Python code.
3838
3939
.. toctree::
@@ -110,7 +110,7 @@ Additional Notes
110110
----------------
111111
112112
This part of the guide, which is mostly prose, begins with some
113-
background information about Python, then focuses on next steps.
113+
background information about Python, and then focuses on next steps.
114114
115115
.. toctree::
116116
:maxdepth: 2
@@ -137,8 +137,3 @@ Contribution notes and legal information (for those interested).
137137
notes/contribute
138138
notes/license
139139
notes/styleguide
140-
141-
142-
143-
144-

docs/dev/env.rst

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Your Development Environment
77
Text Editors
88
::::::::::::
99

10-
Just about anything that can edit plain text will work for writing Python code,
10+
Just about anything that can edit plain text will work for writing Python code;
1111
however, using a more powerful editor may make your life a bit easier.
1212

1313

@@ -97,7 +97,7 @@ using ``<Tab>`` key or any other customized keys.
9797
Emacs
9898
-----
9999

100-
Emacs is another powerful text editor. It is fully programmable (lisp), but
100+
Emacs is another powerful text editor. It is fully programmable (Lisp), but
101101
it can be some work to wire up correctly. A good start if you're already an
102102
Emacs user is `Python Programming in Emacs`_ at EmacsWiki.
103103

@@ -109,16 +109,16 @@ TextMate
109109
--------
110110

111111
`TextMate <http://macromates.com/>`_ brings Apple's approach to operating
112-
systems into the world of text editors. By bridging UNIX underpinnings and
112+
systems into the world of text editors. By bridging Unix underpinnings and
113113
GUI, TextMate cherry-picks the best of both worlds to the benefit of expert
114114
scripters and novice users alike.
115115

116116
Sublime Text
117117
------------
118118

119119
`Sublime Text <http://www.sublimetext.com/>`_ is a sophisticated text
120-
editor for code, markup and prose. You'll love the slick user interface,
121-
extraordinary features and amazing performance.
120+
editor for code, markup, and prose. You'll love the slick user interface,
121+
extraordinary features, and amazing performance.
122122

123123
Sublime Text has excellent support for editing Python code and uses Python for
124124
its plugin API. It also has a diverse variety of plugins,
@@ -133,7 +133,7 @@ Atom
133133
editors.
134134

135135
Atom is web native (HTML, CSS, JS), focusing on modular design and easy plugin
136-
development. It comes with native package control and plethora of packages.
136+
development. It comes with native package control and a plethora of packages.
137137
Recommended for Python development is
138138
`Linter <https://github.com/AtomLinter/Linter>`_ combined with
139139
`linter-flake8 <https://github.com/AtomLinter/linter-flake8>`_.
@@ -156,7 +156,7 @@ Python (on Visual Studio Code)
156156
------------------------------
157157

158158
`Python for Visual Studio <https://marketplace.visualstudio.com/items?itemName=ms-python.python>`_ is an extension for the `Visual Studio Code IDE <https://code.visualstudio.com>`_.
159-
This is a free, light weight, open source IDE, with support for Mac, Windows, and Linux.
159+
This is a free, lightweight, open source IDE, with support for Mac, Windows, and Linux.
160160
Built using open source technologies such as Node.js and Python, with compelling features such as Intellisense (autocompletion), local and remote debugging, linting, and the like.
161161

162162
MIT licensed.
@@ -192,15 +192,15 @@ toward working with scientific Python libraries (namely
192192
`pylint <http://www.logilab.org/857>`_ and
193193
`rope <https://github.com/python-rope/rope>`_.
194194

195-
Spyder is open-source (free), offers code completion, syntax highlighting,
195+
Spyder is open source (free), offers code completion, syntax highlighting,
196196
a class and function browser, and object inspection.
197197

198198

199199
WingIDE
200200
-------
201201

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

205205
WingIDE offers code completion, syntax highlighting, source browser, graphical
206206
debugger and support for version control systems.
@@ -211,11 +211,11 @@ NINJA-IDE
211211

212212
`NINJA-IDE <http://www.ninja-ide.org/>`_ (from the recursive acronym: "Ninja-IDE
213213
Is Not Just Another IDE") is a cross-platform IDE, specially designed to build
214-
Python applications, and runs on Linux/X11, Mac OS X and Windows desktop
214+
Python applications, and runs on Linux/X11, Mac OS X, and Windows desktop
215215
operating systems. Installers for these platforms can be downloaded from the
216216
website.
217217

218-
NINJA-IDE is open-source software (GPLv3 licence) and is developed
218+
NINJA-IDE is open source software (GPLv3 licence) and is developed
219219
in Python and Qt. The source files can be downloaded from
220220
`GitHub <https://github.com/ninja-ide>`_.
221221

@@ -224,11 +224,11 @@ Eric (The Eric Python IDE)
224224
--------------------------
225225

226226
`Eric <http://eric-ide.python-projects.org/>`_ is a full featured Python IDE
227-
offering sourcecode autocompletion, syntax highlighting, support for version
228-
control systems, python 3 support, integrated web browser, python shell,
229-
integrated debugger and a flexible plug-in system. Written in python, it is
230-
based on the Qt gui toolkit, integrating the Scintilla editor control. Eric
231-
is an open-source software project (GPLv3 licence) with more than ten years of
227+
offering source code autocompletion, syntax highlighting, support for version
228+
control systems, Python 3 support, integrated web browser, python shell,
229+
integrated debugger, and a flexible plug-in system. Written in Python, it is
230+
based on the Qt GUI toolkit, integrating the Scintilla editor control. Eric
231+
is an open source software project (GPLv3 licence) with more than ten years of
232232
active development.
233233

234234

@@ -253,8 +253,8 @@ of the Python interpreter to be installed at the same time. This solves the
253253
problem of having different projects requiring different versions of Python.
254254
For example, it becomes very easy to install Python 2.7 for compatibility in
255255
one project, while still using Python 3.4 as the default interpreter.
256-
pyenv isn't just limited to the CPython versions - it will also install PyPy,
257-
anaconda, miniconda, stackless, jython, and ironpython interpreters.
256+
pyenv isn't just limited to the CPython versions it will also install PyPy,
257+
Anaconda, miniconda, stackless, Jython, and IronPython interpreters.
258258

259259
pyenv works by filling a ``shims`` directory with fake versions of the Python
260260
interpreter (plus other tools like ``pip`` and ``2to3``). When the system
@@ -276,7 +276,7 @@ IDLE
276276
----
277277

278278
:ref:`IDLE <python:idle>` is an integrated development environment that is
279-
part of Python standard library. It is completely written in Python and uses
279+
part of the Python standard distribution. It is completely written in Python and uses
280280
the Tkinter GUI toolkit. Though IDLE is not suited for full-blown development
281281
using Python, it is quite helpful to try out small Python snippets and
282282
experiment with different features in Python.
@@ -294,18 +294,18 @@ IPython
294294
`IPython <http://ipython.org/>`_ provides a rich toolkit to help you make the
295295
most out of using Python interactively. Its main components are:
296296

297-
* Powerful Python shells (terminal- and Qt-based).
297+
* Powerful Python shells (terminal- and Qt-based)
298298
* A web-based notebook with the same core features but support for rich media,
299-
text, code, mathematical expressions and inline plots.
300-
* Support for interactive data visualization and use of GUI toolkits.
301-
* Flexible, embeddable interpreters to load into your own projects.
302-
* Tools for high level and interactive parallel computing.
299+
text, code, mathematical expressions and inline plots
300+
* Support for interactive data visualization and use of GUI toolkits
301+
* Flexible, embeddable interpreters to load into your own projects
302+
* Tools for high level and interactive parallel computing
303303

304304
.. code-block:: console
305305
306306
$ pip install ipython
307307
308-
To download and install IPython with all it's optional dependencies for the notebook, qtconsole, tests, and other functionalities
308+
To download and install IPython with all its optional dependencies for the notebook, qtconsole, tests, and other functionalities:
309309

310310
.. code-block:: console
311311
@@ -318,14 +318,14 @@ BPython
318318
Python interpreter for Unix-like operating systems. It has the following
319319
features:
320320

321-
* In-line syntax highlighting.
322-
* Readline-like autocomplete with suggestions displayed as you type.
323-
* Expected parameter list for any Python function.
324-
* "Rewind" function to pop the last line of code from memory and re-evaluate.
325-
* Send entered code off to a pastebin.
326-
* Save entered code to a file.
327-
* Auto-indentation.
328-
* Python 3 support.
321+
* In-line syntax highlighting
322+
* Readline-like autocomplete with suggestions displayed as you type
323+
* Expected parameter list for any Python function
324+
* "Rewind" function to pop the last line of code from memory and re-evaluate
325+
* Send entered code off to a pastebin
326+
* Save entered code to a file
327+
* Auto-indentation
328+
* Python 3 support
329329

330330
.. code-block:: console
331331
@@ -341,12 +341,12 @@ library. It is considered to be an alternative to BPython_. Features include:
341341
* Syntax highlighting
342342
* Autocompletion
343343
* Multiline editing
344-
* Emacs and VIM Mode
344+
* Emacs and Vim Modes
345345
* Embedding REPL inside of your code
346-
* Syntax Validation
346+
* Syntax validation
347347
* Tab pages
348348
* Support for integrating with IPython_'s shell, by installing IPython
349-
``pip install ipython`` and running ``ptipython``.
349+
(``pip install ipython``) and running ``ptipython``.
350350

351351
.. code-block:: console
352352

docs/dev/pip-virtualenv.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _pip-virtualenv:
22

3-
Further Configuration of Pip and Virtualenv
3+
Further Configuration of pip and Virtualenv
44
===========================================
55

66
.. image:: /_static/photos/34018732105_f0e6758859_k_d.jpg
@@ -105,7 +105,7 @@ need any configuration.
105105
When using older versions, you can configure pip in such a way that it tries to
106106
reuse already installed packages, too.
107107

108-
On UNIX systems, you can add the following line to your :file:`.bashrc` or
108+
On Unix systems, you can add the following line to your :file:`.bashrc` or
109109
:file:`.bash_profile` file.
110110

111111
.. code-block:: console
@@ -124,7 +124,7 @@ add the following line to your :file:`pip.ini` file under ``[global]`` settings:
124124
125125
download-cache = %HOME%\pip\cache
126126
127-
Similarly, on UNIX systems you should simply add the following line to your
127+
Similarly, on Unix systems you should simply add the following line to your
128128
:file:`pip.conf` file under ``[global]`` settings:
129129

130130
.. code-block:: console

docs/dev/virtualenvs.rst

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Install virtualenv via pip:
212212
213213
$ pip install virtualenv
214214
215-
Test your installation
215+
Test your installation:
216216

217217
.. code-block:: console
218218
@@ -226,23 +226,26 @@ Basic Usage
226226
.. code-block:: console
227227
228228
$ cd my_project_folder
229-
$ virtualenv my_project
229+
$ virtualenv venv
230230
231-
``virtualenv my_project`` will create a folder in the current directory which will
231+
``virtualenv venv`` will create a folder in the current directory which will
232232
contain the Python executable files, and a copy of the ``pip`` library which you
233233
can use to install other packages. The name of the virtual environment (in this
234-
case, it was ``my_project``) can be anything; omitting the name will place the files
234+
case, it was ``venv``) can be anything; omitting the name will place the files
235235
in the current directory instead.
236236

237+
.. note::
238+
'venv' is the general convention used globally. As it is readily available in ignore files (eg: .gitignore')
239+
237240
This creates a copy of Python in whichever directory you ran the command in,
238-
placing it in a folder named :file:`my_project`.
241+
placing it in a folder named :file:`venv`.
239242

240243
You can also use the Python interpreter of your choice (like
241244
``python2.7``).
242245

243246
.. code-block:: console
244247
245-
$ virtualenv -p /usr/bin/python2.7 my_project
248+
$ virtualenv -p /usr/bin/python2.7 venv
246249
247250
or change the interpreter globally with an env variable in ``~/.bashrc``:
248251

@@ -254,12 +257,20 @@ or change the interpreter globally with an env variable in ``~/.bashrc``:
254257

255258
.. code-block:: console
256259
257-
$ source my_project/bin/activate
260+
$ source venv/bin/activate
258261
259262
The name of the current virtual environment will now appear on the left of
260-
the prompt (e.g. ``(my_project)Your-Computer:your_project UserName$)`` to let you know
263+
the prompt (e.g. ``(venv)Your-Computer:your_project UserName$)`` to let you know
261264
that it's active. From now on, any package that you install using pip will be
262-
placed in the ``my_project`` folder, isolated from the global Python installation.
265+
placed in the ``venv`` folder, isolated from the global Python installation.
266+
267+
For Windows, same command which is mentioned in step 1 can be used for creation of virtual environment. But, to activate, we use the following command.
268+
269+
Assuming that you are in project directory:
270+
271+
.. code-block:: powershell
272+
273+
PS C:\Users\suryav> \venv\Scripts\activate
263274
264275
Install packages as usual, for example:
265276

@@ -281,9 +292,12 @@ To delete a virtual environment, just delete its folder. (In this case,
281292
it would be ``rm -rf my_project``.)
282293

283294
After a while, though, you might end up with a lot of virtual environments
284-
littered across your system, and its possible you'll forget their names or
295+
littered across your system, and it's possible you'll forget their names or
285296
where they were placed.
286297

298+
.. note::
299+
Python has included venv module from version 3.3. For more details: `venv <https://docs.python.org/3/library/venv.html>`_.
300+
287301
Other Notes
288302
~~~~~~~~~~~
289303

@@ -293,7 +307,7 @@ for keeping the package list clean in case it needs to be accessed later.
293307
[This is the default behavior for ``virtualenv`` 1.7 and later.]
294308

295309
In order to keep your environment consistent, it's a good idea to "freeze"
296-
the current state of the environment packages. To do this, run
310+
the current state of the environment packages. To do this, run:
297311

298312
.. code-block:: console
299313
@@ -302,7 +316,7 @@ the current state of the environment packages. To do this, run
302316
This will create a :file:`requirements.txt` file, which contains a simple
303317
list of all the packages in the current environment, and their respective
304318
versions. You can see the list of installed packages without the requirements
305-
format using "pip list". Later it will be easier for a different developer
319+
format using ``pip list``. Later it will be easier for a different developer
306320
(or you, if you need to re-create the environment) to install the same packages
307321
using the same versions:
308322

@@ -343,7 +357,7 @@ To install (make sure **virtualenv** is already installed):
343357
344358
$ pip install virtualenvwrapper-win
345359
346-
In Windows, the default path for WORKON_HOME is %USERPROFILE%\Envs
360+
In Windows, the default path for WORKON_HOME is %USERPROFILE%\\Envs
347361

348362
Basic Usage
349363
~~~~~~~~~~~
@@ -363,7 +377,7 @@ This creates the :file:`my_project` folder inside :file:`~/Envs`.
363377
$ workon my_project
364378
365379
Alternatively, you can make a project, which creates the virtual environment,
366-
and also a project directory inside ``$WORKON_HOME``, which is ``cd`` -ed into
380+
and also a project directory inside ``$WORKON_HOME``, which is ``cd``-ed into
367381
when you ``workon myproject``.
368382

369383
.. code-block:: console

docs/scenarios/ml.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ For installing the full stack, or individual packages, you can refer to the inst
4141
scikit-learn
4242
************
4343

44-
Scikit is a free and open-source machine learning library for Python. It offers off-the-shelf functions to implement many algorithms like linear regression, classifiers, SVMs, k-means, Neural Networks etc. It also has a few sample datasets which can be directly used for training and testing.
44+
Scikit is a free and open source machine learning library for Python. It offers off-the-shelf functions to implement many algorithms like linear regression, classifiers, SVMs, k-means, Neural Networks etc. It also has a few sample datasets which can be directly used for training and testing.
4545

4646
Because of its speed, robustness and easiness to use, it's one of the most widely-used libraries for many Machine Learning applications.
4747

docs/scenarios/scientific.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,10 @@ out.
140140
Anaconda
141141
--------
142142

143-
`Continuum Analytics <http://continuum.io/>`_ offers the `Anaconda
144-
Python Distribution <https://store.continuum.io/cshop/anaconda>`_ which
143+
The `Anaconda Python Distribution <https://www.anaconda.com/>`_
145144
includes all the common scientific Python packages as well as many packages
146-
related to data analytics and big data. Anaconda itself is free, and
147-
Continuum sells a number of proprietary add-ons. Free licenses for the
145+
related to data analytics and big data. Anaconda itself is free, and a number
146+
of proprietary add-ons are available for a fee. Free licenses for the
148147
add-ons are available for academics and researchers.
149148

150149
Canopy

docs/starting/install/osx.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ package.
4848
commandline tools by running ``xcode-select --install`` on the terminal.
4949

5050

51-
While OS X comes with a large number of UNIX utilities, those familiar with
51+
While OS X comes with a large number of Unix utilities, those familiar with
5252
Linux systems will notice one key component missing: a decent package manager.
5353
`Homebrew <http://brew.sh>`_ fills this void.
5454

docs/starting/install3/osx.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ package.
4141
If you perform a fresh install of Xcode, you will also need to add the
4242
commandline tools by running ``xcode-select --install`` on the terminal.
4343

44-
While OS X comes with a large number of UNIX utilities, those familiar with
44+
While OS X comes with a large number of Unix utilities, those familiar with
4545
Linux systems will notice one key component missing: a package manager.
4646
`Homebrew <http://brew.sh>`_ fills this void.
4747

0 commit comments

Comments
 (0)