Browse Source

Added section on IDEs

main
Kenneth John Odle 11 months ago
parent
commit
aa9b85cb72
  1. 24
      Notes on Python.tex

24
Notes on Python.tex

@ -117,6 +117,8 @@ This document was typeset in \LaTeX{}.
\section{Preliminaries}
\kcolb
\subsection{What is Python?}
@ -151,11 +153,15 @@ Mueller\cite{mueller-jp:23} has many reasons why a knowledge of Python may be us
\subsection{IDEs and Python}
An integrated development environment (IDE) is an application that enables you to write code, debug code, and often compile it and execute it. On Linux systems, Python typically comes bundled with IDLE, although others are available. \cite{programiz:ides}\cite{realpython:ide}
The broader question ``should you use an IDE?'' is not as easy to answer. There are reasons IDEs exist, and if you are working on a large project, they can help to speed up the process. However, when you are first starting with Python, it is probably going to be more enlightening to you to use Python directly from the command line, as you will have a better feel for what Python is doing behind the scenes when you eventually do move over to an IDE. (See the section ``\nameref{exec-python}'' below.)
\subsection{Version 2 versus Version 3}
The initial version of Python 2 was released in 2000. Python 2.7, which was released in 2010, is the last version of Python 2. Many people continue to use Python 2, but they shouldn't, and neither should you.
Python 3 was released in December 2008 and is a drastically different language than Python 2. Among other things,
Python 3 was released in December 2008 and is a drastically different language than Python 2. Among other things:
\begin{enumerate}[noitemsep]
\item Python 3 stores strings as Unicode, whereas Python 2 stores them as ASCII.
@ -166,7 +172,7 @@ Python 3 was released in December 2008 and is a drastically different language t
\item Most of the new libraries for Python 3 cannot be used in Python 2.
\end{enumerate}
Most importantly, the Python project stopped supporting Python 2 after 31 December 2019, meaning \kpull{\textit{Use Python 3!}}{1in} that it is not getting bug fixes or security updates. Anything written in Python 2 is not as efficient, and definitely not as secure, as anything written in Python 3.
Most importantly, the Python project stopped supporting Python 2 after 31 December 2019, meaning \kpull{\textit{Use Python 3!}}{21mm} that it is not getting bug fixes or security updates. Anything written in Python 2 is not as efficient, and definitely not as secure, as anything written in Python 3.
\subsection{Comments in Python}
@ -203,6 +209,8 @@ software = code + documentation
\rule{\linewidth}{0.5pt}
\end{quote}
\bigskip
That documentation is both external (i.e., user manuals) and internal (i.e., comments). You can (and should) use comments to:
\begin{itemize}[noitemsep]
@ -217,6 +225,8 @@ That documentation is both external (i.e., user manuals) and internal (i.e., com
You can, of course, also use comments to prevent certain lines of code from executing, a practice known as ``commenting out''. This is useful when troubleshooting your code.
\subsection{Executing Python Code}\label{exec-python}
\kcole
\newpage
@ -249,6 +259,11 @@ You can, of course, also use comments to prevent certain lines of code from exec
2023.\\
\kbib{}This book \textit{heavily} emphasizes the use of Google Colab. It's basically an advertisement for the $\Gamma$oogle and \textit{highly} disappointing. Python is meant to be fairly universal and this book's approach seems to work counter to that intention.
\bibitem{programiz:ides}
programiz.com.
``Python IDEs and Code Editors''.\\
\kbib\kref{https://www.programiz.com/python-programming/ide}{https://www.programiz.com/python-\\programming/ide}
\bibitem{pythonorg:beginnersguide}
python.org
``Beginner's Guide to Python'',
@ -271,6 +286,11 @@ You can, of course, also use comments to prevent certain lines of code from exec
\kbib\kref{https://www.python.org/doc/essays/blurb/}{https://www.python.org/doc/essays/blurb/}\\
\kbib The official description of what Python is.
\bibitem{realpython:ide}
realpython.com.
``Python IDEs and Code Editors (Guide), \\
\kbib\kref{https://realpython.com/python-ides-code-editors-guide/}{https://realpython.com/python-ides-code-\\editors-guide/}
\kcole
\end{thebibliography}

Loading…
Cancel
Save