You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/the-interpreter.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
The Interpreter
2
2
===============
3
3
4
-
Python is an interpreted language, similiar in the way to how Java operates, with bytecode. However, unlike Java, you will normally work with ``*.py`` files directly, instead of compiled bytecode files (``*.pyc``).
4
+
Python is an interpreted language, similar in the way to how Java operates, with bytecode. However, unlike Java, you will normally work with ``*.py`` files directly, instead of compiled bytecode files (``*.pyc``).
5
5
6
6
To fire up the Python interpreter, open up your terminal/console application, and type ``python`` or ``python3`` (depending on your installation). You should see something that looks like this::
7
7
@@ -10,7 +10,7 @@ To fire up the Python interpreter, open up your terminal/console application, an
10
10
Type "help", "copyright", "credits" or "license" for more information.
11
11
>>>
12
12
13
-
This is known as the Python interpreter, and is a REPL (Read–Eval–Print Loop). This allows you to type Python code, import modules, and interact with code you've written without having to write files to disk, in an interactive manner. This interactive mode is one of Python's super-powers, compared some other programming lanuages.
13
+
This is known as the Python interpreter, and is a REPL (Read–Eval–Print Loop). This allows you to type Python code, import modules, and interact with code you've written without having to write files to disk, in an interactive manner. This interactive mode is one of Python's super-powers, compared some other programming languages.
14
14
15
15
Running a Script
16
16
----------------
@@ -24,7 +24,7 @@ This will tell Python to load and execute the script provided.
24
24
Dependencies
25
25
++++++++++++
26
26
27
-
Sometimes, a script will not run because it does not have the neccessary dependencies installed. You'll normally see this come across as a ``ModuleNotFoundError``, embedded within a confusing (if you're new) exception message::
27
+
Sometimes, a script will not run because it does not have the necessary dependencies installed. You'll normally see this come across as a ``ModuleNotFoundError``, embedded within a confusing (if you're new) exception message::
28
28
29
29
Traceback (most recent call last):
30
30
File "name-of-script.py", line 1, in <module>
@@ -75,7 +75,7 @@ Bytecode Trick
75
75
76
76
The second trick is ``PYTHONDONTWRITEBYTECODE``. If you set this environment variable (e.g. in your ``~/.bashrc`` file or similar), Python won't write ``*.pyc`` files to disk, which is great, because they are incredibly annoying.
77
77
78
-
I've been using this environment variable for 7+ years for development and have never had any problems becaue of it.
78
+
I've been using this environment variable for 7+ years for development and have never had any problems because of it.
0 commit comments