diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-02-19 19:33:35 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-02-19 19:57:08 (GMT) |
| commit | df11539c29745f5592259b13320c834c3cb920fa (patch) | |
| tree | 7882cc2899b3ad868b40b46e4422bacc4dece53a /tools | |
| parent | f689c90498b58a5198bb56a2d3d5211db9670283 (diff) | |
wasp: Simple shell commands (based on upysh)
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/wasptool | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/wasptool b/tools/wasptool index a6faf38..822ada9 100755 --- a/tools/wasptool +++ b/tools/wasptool @@ -83,11 +83,14 @@ def handle_rtc(c): def handle_upload(c, fname): verbose = bool(c.logfile) + c.sendline('from shell import upload') + c.expect('>>> ') + with open(fname) as f: if not verbose: print(f'Uploading {fname} ...', end='', flush=True) - c.sendline(f'upload("{fname}")') + c.sendline(f'upload("{os.path.basename(fname)}")') c.expect('=== ') paste(c, f, verbose) c.send('\x04') |
