tordam

A library for peer discovery inside the Tor network
git clone https://git.parazyd.org/tordam
Log | Files | Refs | README | LICENSE

commit fef7f290c2817471b77e212ea8eb7fd0d75f3b26
parent 6ead90df16d53a7699efb5405129c053ef538d1f
Author: parazyd <parazyd@dyne.org>
Date:   Fri,  8 Dec 2017 18:06:46 +0100

Flush stdout in python when writing to it

Diffstat:
Mpython/decodehs.py | 4+++-
Mpython/dirauth.py | 1+
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/python/decodehs.py b/python/decodehs.py @@ -47,9 +47,11 @@ def main(): service = start_hs(ctl=controller, ktype=ktype, kcont=kcont) - stdout.write('Started HS at %.onion\n' % service.service_id) + stdout.write('Started HS at %s.onion\n' % service.service_id) + stdout.flush() while True: stdout.write('OK\n') + stdout.flush() sleep(10) if __name__ == '__main__': diff --git a/python/dirauth.py b/python/dirauth.py @@ -13,3 +13,4 @@ from stem.control import Controller with Controller.from_port() as ctl: ctl.authenticate(password='topkek') stdout.write(ctl.get_hidden_service_descriptor(argv[1]).permanent_key) + stdout.flush()