From 3d091e342236664d9d951968bc833dd552bffce5 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Wed, 19 Feb 2020 19:35:49 +0000 Subject: wasptool: Launch the console after all other arguments This allows for an elegant iterative development approach where we upload some code than then interact with it, for example: wasptool --exec wasp/drivers/nrf_rtc.py --console rtc = RTC(watch.rtc.counter) diff --git a/tools/wasptool b/tools/wasptool index 822ada9..62ebaa5 100755 --- a/tools/wasptool +++ b/tools/wasptool @@ -129,10 +129,6 @@ if __name__ == '__main__': time.sleep(0.5) sync(console) - if args.console: - console.close() - os.execl(pynus, pynus) - if args.eval: handle_eval(console, args.eval) @@ -145,4 +141,8 @@ if __name__ == '__main__': if args.rtc: handle_rtc(console) + if args.console: + console.close() + os.execl(pynus, pynus) + unsync(console) -- cgit v0.10.2