diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-04 04:07:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-04 04:07:44 +0000 |
commit | 7693c11b424a25612782de924a1f7f07f649675f (patch) | |
tree | 4dabd5679f14e8113bfb5d080b91f8ff3cb85cfd /examples | |
parent | Releasing progress-linux version 3.0.26-3~progress7.99u1. (diff) | |
download | ptpython-7693c11b424a25612782de924a1f7f07f649675f.tar.xz ptpython-7693c11b424a25612782de924a1f7f07f649675f.zip |
Merging upstream version 3.0.27.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | examples/asyncio-python-embed.py | 1 | ||||
-rwxr-xr-x | examples/asyncio-ssh-python-embed.py | 1 | ||||
-rw-r--r-- | examples/ptpython_config/config.py | 1 | ||||
-rwxr-xr-x | examples/python-embed-with-custom-prompt.py | 1 | ||||
-rwxr-xr-x | examples/python-embed.py | 4 | ||||
-rwxr-xr-x | examples/python-input.py | 4 | ||||
-rw-r--r-- | examples/test-cases/ptpython-in-other-thread.py | 1 |
7 files changed, 9 insertions, 4 deletions
diff --git a/examples/asyncio-python-embed.py b/examples/asyncio-python-embed.py index a8fbba5..38cc1c2 100755 --- a/examples/asyncio-python-embed.py +++ b/examples/asyncio-python-embed.py @@ -11,6 +11,7 @@ The ``patch_stdout`` option makes sure that when another coroutine is writing to stdout, it won't break the input line, but instead writes nicely above the prompt. """ + import asyncio from ptpython.repl import embed diff --git a/examples/asyncio-ssh-python-embed.py b/examples/asyncio-ssh-python-embed.py index be0689e..9bbad86 100755 --- a/examples/asyncio-ssh-python-embed.py +++ b/examples/asyncio-ssh-python-embed.py @@ -5,6 +5,7 @@ This requires Python 3, asyncio and asyncssh. Run this example and then SSH to localhost, port 8222. """ + import asyncio import logging diff --git a/examples/ptpython_config/config.py b/examples/ptpython_config/config.py index b25850a..bfd3914 100644 --- a/examples/ptpython_config/config.py +++ b/examples/ptpython_config/config.py @@ -5,6 +5,7 @@ Copy this file to $XDG_CONFIG_HOME/ptpython/config.py On Linux, this is: ~/.config/ptpython/config.py On macOS, this is: ~/Library/Application Support/ptpython/config.py """ + from prompt_toolkit.filters import ViInsertMode from prompt_toolkit.key_binding.key_processor import KeyPress from prompt_toolkit.keys import Keys diff --git a/examples/python-embed-with-custom-prompt.py b/examples/python-embed-with-custom-prompt.py index d54da1d..5e8c707 100755 --- a/examples/python-embed-with-custom-prompt.py +++ b/examples/python-embed-with-custom-prompt.py @@ -2,6 +2,7 @@ """ Example of embedding a Python REPL, and setting a custom prompt. """ + from prompt_toolkit.formatted_text import HTML, AnyFormattedText from ptpython.prompt_style import PromptStyle diff --git a/examples/python-embed.py b/examples/python-embed.py index 49224ac..a748101 100755 --- a/examples/python-embed.py +++ b/examples/python-embed.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -""" -""" +""" """ + from ptpython.repl import embed diff --git a/examples/python-input.py b/examples/python-input.py index 567c2ee..d586d0f 100755 --- a/examples/python-input.py +++ b/examples/python-input.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -""" -""" +""" """ + from ptpython.python_input import PythonInput diff --git a/examples/test-cases/ptpython-in-other-thread.py b/examples/test-cases/ptpython-in-other-thread.py index 7c78846..bfe1410 100644 --- a/examples/test-cases/ptpython-in-other-thread.py +++ b/examples/test-cases/ptpython-in-other-thread.py @@ -5,6 +5,7 @@ Example of running ptpython in another thread. (For testing whether it's working fine if it's not embedded in the main thread.) """ + import threading from ptpython.repl import embed |