summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xexamples/asyncio-python-embed.py1
-rwxr-xr-xexamples/asyncio-ssh-python-embed.py1
-rw-r--r--examples/ptpython_config/config.py1
-rwxr-xr-xexamples/python-embed-with-custom-prompt.py1
-rwxr-xr-xexamples/python-embed.py4
-rwxr-xr-xexamples/python-input.py4
-rw-r--r--examples/test-cases/ptpython-in-other-thread.py1
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