Skip to content
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
96e1e78
Add the multiple interpreters howto doc.
ericsnowcurrently Jul 16, 2024
e5e980e
Drop extraneous changes.
ericsnowcurrently Jun 19, 2025
2fcaedd
Finish howto doc, minus recipes.
ericsnowcurrently Jun 20, 2025
aea8278
Add a TODO list.
ericsnowcurrently Jun 26, 2025
4bb1e2f
Drop the execcomponents ref.
ericsnowcurrently Jun 30, 2025
d1ab402
Fix a ref.
ericsnowcurrently Jun 30, 2025
1c2d40f
Drop the examples section for now.
ericsnowcurrently Jun 30, 2025
ade2ce3
Fix typos.
ericsnowcurrently Jul 1, 2025
40f50e7
Add a misc section to the tutorial.
ericsnowcurrently Jul 1, 2025
0c3105b
Clarify about prepare_main().
ericsnowcurrently Jul 1, 2025
6028349
Fix a pseudo-ref.
ericsnowcurrently Jul 1, 2025
d7a7cf0
Fix the examples.
ericsnowcurrently Jul 1, 2025
fb13944
Tweak one example.
ericsnowcurrently Jul 1, 2025
72e46fb
Add a ref.
ericsnowcurrently Jul 2, 2025
675246d
Clarify about Interpreter.exec().
ericsnowcurrently Jul 3, 2025
22e3ee0
Clarify about calling different kinds of function.
ericsnowcurrently Jul 3, 2025
f7661da
Clarify a note.
ericsnowcurrently Jul 3, 2025
28f0218
Add a caveat about -c and the REPL.
ericsnowcurrently Jul 3, 2025
1b79755
Add a pro tip.
ericsnowcurrently Jul 3, 2025
b75c380
Add run-examples.py and fix some of the examples.
ericsnowcurrently Sep 23, 2025
35101a0
Do not try reformatting run-examples.py.
ericsnowcurrently Sep 24, 2025
ddae34c
Fix some of the examples.
ericsnowcurrently Sep 24, 2025
652abd3
Do not lint run-examples.py.
ericsnowcurrently Sep 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a caveat about -c and the REPL.
  • Loading branch information
ericsnowcurrently committed Jul 3, 2025
commit 28f0218c39f46bd8563532523a0c1639fc10e7fd
6 changes: 6 additions & 0 deletions Doc/howto/multiple-interpreters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ executed with :data:`!__name__` set to something other than
put it in the if block. You will probably only want functions or
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
put it in the if block. You will probably only want functions or
put it in the ``if`` block. You will probably only want functions or

classes outside the if block.

Another thing to keep in mind is that, when you run the REPL or run
``python -c ...``, the code that runs is essentially unrecoverable. The
contents of the :mod:`__main__` module cannot be reproduced by executing
a script (or module) file. Consequently, calling a function defined
in :mod:`__main__` in these cases will probably fail.

Calling Methods and Other Objects in an Interpreter
---------------------------------------------------
Comment on lines +441 to +442
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Calling Methods and Other Objects in an Interpreter
---------------------------------------------------
Calling methods and other objects in an interpreter
---------------------------------------------------


Expand Down
Loading