Skip to content

Commit b654cb7

Browse files
committed
Minoy Pythonic update.
1 parent 865ab02 commit b654cb7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

main.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from pyscript import document
77

88

9-
# It's the same API as JavaScript when interacting with the document object!
9+
# It's the same API as JS when using the document object!
1010
python_terminal = document.getElementById("python-terminal")
1111

1212

@@ -18,11 +18,16 @@ async def type_it_in(code):
1818
for line in lines:
1919
await asyncio.sleep(1)
2020
for char in line:
21-
wait = random.choice([0.05, 0.07, 0.1, 0.15, 0.2, 0.3])
21+
wait = random.choice(
22+
[0.05, 0.07, 0.1, 0.15, 0.2, 0.3]
23+
)
2224
await asyncio.sleep(wait)
2325
python_terminal.terminal.write(char)
2426
python_terminal.process(line.strip())
2527

2628

2729
# Web scale use of advanced AI.
28-
await type_it_in('print("Hello, from PyScript!")\r\n# Your turn...')
30+
await type_it_in(
31+
'print("Hello, from PyScript!")\r\n'
32+
'# Your turn...'
33+
)

0 commit comments

Comments
 (0)