Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eee09c7

Browse filesBrowse files
authored
Merge pull request #1 from realpython/master
Update the real python
2 parents fdb272e + ad05712 commit eee09c7
Copy full SHA for eee09c7
Expand file treeCollapse file tree

31 files changed

+215
-193
lines changed

‎docs/_templates/sidebarintro.html

Copy file name to clipboardExpand all lines: docs/_templates/sidebarintro.html
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ <h3>Contributors</h3>
5959
<h3>Useful Links</h3>
6060
<ul>
6161
<li><a href="https://docs.python-guide.org/">The Guide Website</a></li>
62-
<li><a href="http://github.com/realpython/python-guide">The Guide @ GitHub</a></li>
63-
<li><a href="http://github.com/realpython/python-guide/issues">Issue Tracker</a></li>
62+
<li><a href="https://github.com/realpython/python-guide">The Guide @ GitHub</a></li>
63+
<li><a href="https://github.com/realpython/python-guide/issues">Issue Tracker</a></li>
6464
<li><a href="https://media.readthedocs.org/pdf/python-guide/latest/python-guide.pdf">The Guide as a PDF</a></li>
6565
</ul>
6666

@@ -69,8 +69,8 @@ <h3>Translations</h3>
6969
<li><a href="https://docs.python-guide.org/">English</a></li>
7070
<li><a href="https://python-guide-fr.readthedocs.io/fr/latest/">French</a></li>
7171
<li><a href="https://pythonguidecn.readthedocs.io/zh/latest/">Chinese</a></li>
72-
<li><a href="http://python-guideja.readthedocs.io/ja/latest/">Japanese</a></li>
72+
<li><a href="https://python-guideja.readthedocs.io/ja/latest/">Japanese</a></li>
7373
<li><a href="https://python-guide-kr.readthedocs.io/ko/latest/">Korean</a></li>
74-
<li><a href="http://python-guide-fil.readthedocs.io/en/latest/">Filipino</a></li>
75-
<li><a href="http://python-guide-pt-br.readthedocs.io/pt_BR/latest/">Brazilian Portuguese</a></li>
74+
<li><a href="https://python-guide-fil.readthedocs.io/en/latest/">Filipino</a></li>
75+
<li><a href="https://python-guide-pt-br.readthedocs.io/pt_BR/latest/">Brazilian Portuguese</a></li>
7676
</ul>

‎docs/conf.py

Copy file name to clipboardExpand all lines: docs/conf.py
+8-3Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
# All configuration values have a default; values that are commented out
1212
# serve to show the default.
1313

14-
import sys, os
14+
import datetime
15+
import os
16+
import sys
1517

1618
# If extensions (or modules to document with autodoc) are in another directory,
1719
# add these directories to sys.path here. If the directory is relative to the
@@ -45,8 +47,11 @@
4547
master_doc = 'index'
4648

4749
# General information about the project.
50+
current_year = datetime.datetime.now().year
4851
project = u'pythonguide'
49-
copyright = u'2011–2018 <a href="http://kennethreitz.com/pages/open-projects.html">Kenneth Reitz</a> &amp; <a href="https://realpython.com">Real Python</a>. <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY-NC-SA 3.0</a>'
52+
copyright = (u'2011-{} <a href="http://kennethreitz.com/pages/open-projects.html">Kenneth Reitz</a>'
53+
' &amp; <a href="https://realpython.com">Real Python</a>.'
54+
' <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY-NC-SA 3.0</a>').format(current_year)
5055

5156
# The version info for the project you're documenting, acts as replacement for
5257
# |version| and |release|, also used in various other places throughout the
@@ -241,7 +246,7 @@
241246
epub_title = u'pythonguide'
242247
epub_author = u'Kenneth Reitz'
243248
epub_publisher = u'Kenneth Reitz'
244-
epub_copyright = u'2011–2018, Kenneth Reitz & Real Python'
249+
epub_copyright = u'2011–{}, Kenneth Reitz & Real Python'.format(current_year)
245250

246251
# The language of the text. It defaults to the language option
247252
# or en if the language is not set.

‎docs/dev/env.rst

Copy file name to clipboardExpand all lines: docs/dev/env.rst
+17-17Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ using ``<Tab>`` key or any other customized keys.
8787

8888
.. _indent: http://www.vim.org/scripts/script.php?script_id=974
8989
.. _syntax: http://www.vim.org/scripts/script.php?script_id=790
90-
.. _Pyflakes: http://pypi.python.org/pypi/pyflakes/
91-
.. _pycodestyle: https://pypi.python.org/pypi/pycodestyle/
92-
.. _syntastic: https://github.com/scrooloose/syntastic
93-
.. _Python-mode: https://github.com/klen/python-mode
90+
.. _Pyflakes: http://pypi.org/project/pyflakes/
91+
.. _pycodestyle: https://pypi.org/project/pycodestyle/
92+
.. _syntastic: https://github.com/vim-syntastic/syntastic
93+
.. _Python-mode: https://github.com/python-mode/python-mode
9494
.. _SuperTab: http://www.vim.org/scripts/script.php?script_id=1643
9595
.. _vim-flake8: https://github.com/nvie/vim-flake8
9696

@@ -103,7 +103,7 @@ Emacs user is `Python Programming in Emacs`_ at EmacsWiki.
103103

104104
1. Emacs itself comes with a Python mode.
105105

106-
.. _Python Programming in Emacs: http://emacswiki.org/emacs/PythonProgrammingInEmacs
106+
.. _Python Programming in Emacs: https://www.emacswiki.org/emacs/PythonProgrammingInEmacs
107107

108108
TextMate
109109
--------
@@ -135,7 +135,7 @@ Atom
135135
Atom is web native (HTML, CSS, JS), focusing on modular design and easy plugin
136136
development. It comes with native package control and a plethora of packages.
137137
Recommended for Python development is
138-
`Linter <https://github.com/AtomLinter/Linter>`_ combined with
138+
`Linter <https://github.com/steelbrain/linter>`_ combined with
139139
`linter-flake8 <https://github.com/AtomLinter/linter-flake8>`_.
140140

141141

@@ -163,21 +163,21 @@ MIT licensed.
163163

164164
Enthought Canopy
165165
----------------
166-
`Enthought Canopy <https://www.enthought.com/products/canopy/>`_ is a Python
166+
`Enthought Canopy <https://www.enthought.com/product/canopy/>`_ is a Python
167167
IDE which is focused towards Scientists and Engineers as it provides pre
168168
installed libraries for data analysis.
169169

170170
Eclipse
171171
-------
172172

173173
The most popular Eclipse plugin for Python development is Aptana's
174-
`PyDev <http://pydev.org>`_.
174+
`PyDev <https://pydev.org>`_.
175175

176176

177177
Komodo IDE
178178
----------
179179

180-
`Komodo IDE <http://www.activestate.com/komodo-ide>`_ is developed by
180+
`Komodo IDE <https://www.activestate.com/products/komodo-ide/>`_ is developed by
181181
ActiveState and is a commercial IDE for Windows, Mac, and Linux.
182182
`KomodoEdit <https://github.com/Komodo/KomodoEdit>`_ is the open source
183183
alternative.
@@ -188,8 +188,8 @@ Spyder
188188

189189
`Spyder <https://github.com/spyder-ide/spyder>`_ is an IDE specifically geared
190190
toward working with scientific Python libraries (namely
191-
`SciPy <http://www.scipy.org/>`_). It includes integration with pyflakes_,
192-
`pylint <http://www.logilab.org/857>`_ and
191+
`SciPy <https://www.scipy.org/>`_). It includes integration with pyflakes_,
192+
`pylint <https://www.logilab.org/857>`_ and
193193
`rope <https://github.com/python-rope/rope>`_.
194194

195195
Spyder is open source (free), offers code completion, syntax highlighting,
@@ -242,13 +242,13 @@ Virtual Environments
242242
Virtual Environments provide a powerful way to isolate project package dependencies. This means that you can use packages particular to a Python project without installing them system wide and thus avoiding potential version conflicts.
243243

244244
To start using and see more information:
245-
`Virtual Environments <http://github.com/kennethreitz/python-guide/blob/master/docs/dev/virtualenvs.rst>`_ docs.
245+
`Virtual Environments <https://github.com/kennethreitz/python-guide/blob/master/docs/dev/virtualenvs.rst>`_ docs.
246246

247247

248248
pyenv
249249
-----
250250

251-
`pyenv <https://github.com/yyuu/pyenv>`_ is a tool to allow multiple versions
251+
`pyenv <https://github.com/pyenv/pyenv-virtualenv>`_ is a tool to allow multiple versions
252252
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
@@ -264,7 +264,7 @@ pyenv. pyenv then works out which version of Python should be run based on
264264
environment variables, ``.python-version`` files, and the global default.
265265

266266
pyenv isn't a tool for managing virtual environments, but there is the plugin
267-
`pyenv-virtualenv <https://github.com/yyuu/pyenv-virtualenv>`_ which automates
267+
`pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_ which automates
268268
the creation of different environments, and also makes it possible to use the
269269
existing pyenv tools to switch to different environments based on environment
270270
variables or ``.python-version`` files.
@@ -314,7 +314,7 @@ To download and install IPython with all its optional dependencies for the noteb
314314
BPython
315315
-------
316316

317-
`bpython <http://bpython-interpreter.org/>`_ is an alternative interface to the
317+
`bpython <https://bpython-interpreter.org/>`_ is an alternative interface to the
318318
Python interpreter for Unix-like operating systems. It has the following
319319
features:
320320

@@ -334,8 +334,8 @@ features:
334334
ptpython
335335
--------
336336

337-
`ptpython <https://github.com/jonathanslenders/ptpython/>`_ is a REPL build
338-
on top of the `prompt_toolkit <http://github.com/jonathanslenders/python-prompt-toolkit>`_
337+
`ptpython <https://github.com/prompt-toolkit/ptpython>`_ is a REPL build
338+
on top of the `prompt_toolkit <https://github.com/prompt-toolkit/python-prompt-toolkit>`_
339339
library. It is considered to be an alternative to BPython_. Features include:
340340

341341
* Syntax highlighting

‎docs/dev/virtualenvs.rst

Copy file name to clipboardExpand all lines: docs/dev/virtualenvs.rst
+17-17Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ tutorial) and run:
118118

119119
.. code-block:: console
120120
121-
$ cd myproject
121+
$ cd project_folder
122122
$ pipenv install requests
123123
124124
Pipenv will install the excellent `Requests`_ library and create a ``Pipfile``
@@ -156,7 +156,7 @@ when you share your project with others. You should get output similar to this
156156
Adding requests to Pipfile's [packages]...
157157
P.S. You have excellent taste! ✨ 🍰 ✨
158158
159-
.. _Requests: https://python-requests.org
159+
.. _Requests: http://docs.python-requests.org/en/master/
160160

161161

162162
Using installed packages
@@ -200,7 +200,7 @@ Congratulations, you now know how to install and use Python packages! ✨ 🍰
200200
Lower level: virtualenv
201201
=======================
202202

203-
`virtualenv <http://pypi.python.org/pypi/virtualenv>`_ is a tool to create
203+
`virtualenv <http://pypi.org/project/virtualenv>`_ is a tool to create
204204
isolated Python environments. virtualenv creates a folder which contains all the
205205
necessary executables to use the packages that a Python project would need.
206206

@@ -225,7 +225,7 @@ Basic Usage
225225

226226
.. code-block:: console
227227
228-
$ cd my_project_folder
228+
$ cd project_folder
229229
$ virtualenv venv
230230
231231
``virtualenv venv`` will create a folder in the current directory which will
@@ -260,19 +260,19 @@ or change the interpreter globally with an env variable in ``~/.bashrc``:
260260
$ source venv/bin/activate
261261
262262
The name of the current virtual environment will now appear on the left of
263-
the prompt (e.g. ``(venv)Your-Computer:your_project UserName$)`` to let you know
263+
the prompt (e.g. ``(venv)Your-Computer:project_folder UserName$)`` to let you know
264264
that it's active. From now on, any package that you install using pip will be
265265
placed in the ``venv`` folder, isolated from the global Python installation.
266266

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.
267+
For Windows, the same command mentioned in step 1 can be used to create a virtual environment. However, activating the environment requires a slightly different command.
268268

269-
Assuming that you are in project directory:
269+
Assuming that you are in your project directory:
270270

271-
.. code-block:: powershell
271+
.. code-block:: console
272272
273-
PS C:\Users\suryav> \venv\Scripts\activate
273+
C:\Users\SomeUser\project_folder> venv\Scripts\activate
274274
275-
Install packages as usual, for example:
275+
Install packages using the ``pip`` command:
276276

277277
.. code-block:: console
278278
@@ -283,13 +283,13 @@ Install packages as usual, for example:
283283

284284
.. code-block:: console
285285
286-
$ deactivate
286+
$ deactivate
287287
288288
This puts you back to the system's default Python interpreter with all its
289289
installed libraries.
290290

291291
To delete a virtual environment, just delete its folder. (In this case,
292-
it would be ``rm -rf my_project``.)
292+
it would be ``rm -rf project_folder``.)
293293

294294
After a while, though, you might end up with a lot of virtual environments
295295
littered across your system, and it's possible you'll forget their names or
@@ -366,23 +366,23 @@ Basic Usage
366366

367367
.. code-block:: console
368368
369-
$ mkvirtualenv my_project
369+
$ mkvirtualenv project_folder
370370
371-
This creates the :file:`my_project` folder inside :file:`~/Envs`.
371+
This creates the :file:`project_folder` folder inside :file:`~/Envs`.
372372

373373
2. Work on a virtual environment:
374374

375375
.. code-block:: console
376376
377-
$ workon my_project
377+
$ workon project_folder
378378
379379
Alternatively, you can make a project, which creates the virtual environment,
380380
and also a project directory inside ``$WORKON_HOME``, which is ``cd``-ed into
381-
when you ``workon myproject``.
381+
when you ``workon project_folder``.
382382

383383
.. code-block:: console
384384
385-
$ mkproject myproject
385+
$ mkproject project_folder
386386
387387
**virtualenvwrapper** provides tab-completion on environment names. It really
388388
helps when you have a lot of environments and have trouble remembering their

‎docs/intro/duction.rst

Copy file name to clipboardExpand all lines: docs/intro/duction.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ include:
2828
object serialization, and much more.
2929

3030
Additionally, the
31-
`Python Package Index <http://pypi.python.org/pypi/>`_ is available
31+
`Python Package Index <https://pypi.org>`_ is available
3232
for users to submit their packages for widespread use, similar to
33-
Perl's `CPAN <http://www.cpan.org>`_. There is a thriving community
33+
Perl's `CPAN <https://www.cpan.org>`_. There is a thriving community
3434
of very powerful Python frameworks and tools like
35-
the `Django <http://www.djangoproject.com>`_ web framework and the
35+
the `Django <https://www.djangoproject.com>`_ web framework and the
3636
`NumPy <http://numpy.scipy.org>`_ set of math routines.
3737

3838
* **integration with other systems**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.