Skip to content

Commit

Permalink
Merge pull request #35 from inpefess/maintenance
Browse files Browse the repository at this point in the history
Maintenance
  • Loading branch information
inpefess committed Sep 13, 2021
2 parents 529a2ae + bcb85be commit 05765c5
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 81 deletions.
Binary file modified examples/tty.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/video_example/char_by_char.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""
import time

with open("video_example/example.txt", "r") as example:
with open("video_example/example.txt", "r", encoding="utf-8") as example:
lines = example.readlines()

for line in lines:
Expand Down
10 changes: 6 additions & 4 deletions examples/video_example/example.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Hi! This is an example of using ``isabelle-client`` package
python
ipython
SLEEP 1
# first, we need to start an Isabelle server
from isabelle_client import start_isabelle_server

server_info, _ = start_isabelle_server(
name="test", port=9999, log_file="server.log"
)
SLEEP 1
SLEEP 2
# we could also start the server outside this script and use its info
# now let's create a client to our server
from isabelle_client import get_isabelle_client
Expand All @@ -18,8 +19,8 @@ import logging
isabelle.logger = logging.getLogger()
isabelle.logger.setLevel(logging.INFO)
isabelle.logger.addHandler(logging.FileHandler("session.log"))
# let's suppose that we also have another Python script which generates some
# theory files
# let's suppose that we also have another Python script which generates
# some theory files
# now we can build a session document using ROOT and root.tex files
isabelle.session_build(dirs=["."], session="examples")
SLEEP 3
Expand All @@ -29,6 +30,7 @@ SLEEP 3
from isabelle_client import async_run

async_run(isabelle.execute_command("echo 42", asynchronous=False))
isabelle.shutdown()
exit()
# our sessions was logged to the file:
cat session.log & sleep 3
Expand Down

0 comments on commit 05765c5

Please sign in to comment.