Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cooper@us:~/repos$ /opt/venvs/eb/bin/python3.7 example_with_fifos.py
- exabgp 4.1.0-2074ac17
- done
- cooper@us:~/repos$ sudo /opt/venvs/eb/bin/python3.7 example_with_fifos.py
- exabgp 4.1.0-2074ac17
- done
- Code:
- cooper@us:~/repos$ cat example_with_fifos.py
- #!/usr/bin/env python3
- from pathlib import Path
- IN_FILE = Path("/run/exabgp.in")
- OUT_FILE = Path("/run/exabgp.out")
- cmd = "version\n"
- with IN_FILE.open("w") as infp:
- infp.write(cmd)
- with OUT_FILE.open("r") as outfp:
- print(outfp.read())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement