Browse Source

Add Python demo and move demos to their own subdir

master
Samuel Sloniker 2 years ago
parent
commit
37786d41c1
  1. 3
      README.md
  2. 13
      demos/python.py
  3. 0
      demos/shell.sh

3
README.md

@ -13,4 +13,5 @@ particular, HTTP response codes are ignored (see #1).
git clone https://git.kj7rrv.com/kj7rrv/netrun git clone https://git.kj7rrv.com/kj7rrv/netrun
cd netrun cd netrun
pip3 install -r requirements.txt pip3 install -r requirements.txt
python3 netrun.py https://git.kj7rrv.com/kj7rrv/netrun/raw/branch/master/demo_script.sh python3 netrun.py https://git.kj7rrv.com/kj7rrv/netrun/raw/branch/master/demos/shell.sh
python3 netrun.py --interpreter=python3 https://git.kj7rrv.com/kj7rrv/netrun/raw/branch/master/demos/python.py

13
demos/python.py

@ -0,0 +1,13 @@
#!/usr/bin/env python3
import platform
import textwrap
import os
language = f"Python {platform.python_version()}"
operating_system = f"{platform.system()} {platform.release()}"
machine = f"a system with a(n) {platform.processor()} processor"
message = f"You are running {language} on {operating_system} on {machine}."
for line in textwrap.wrap(message, os.get_terminal_size().columns):
print(line)

0
demo_script.sh → demos/shell.sh

Loading…
Cancel
Save