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)
This commit is contained in:
Daniel Thompson 2020-02-19 19:35:49 +00:00
parent df11539c29
commit 3d091e3422

View file

@ -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)