Skip to main content

No project description provided

Project description

docs: https://mpy-repl-tool.readthedocs.io/en/latest

Transfer files via Python REPL (Read Eval Print Loop). This tool was developed to transfer files from and to MicroPython boards.

This is yet an other tool, there are now several similar tools but not all have the same features.

Key features of this one:

  • detect serial ports and micropython boards.

  • run temporary scripts.

  • pull get files and directories from the target filesystem.

  • push files and directories on the target filesystem.

  • mount target as filesytem (FUSE).

  • --interactive mode (terminal).

  • All of the above, and more, via the serial REPL connection to a micropython board.

Usage

Here is the output of python3 -m there --help:

usage: __main__.py [-h] [-p PORT] [-b BAUDRATE] [-c COMMAND] [-i] [-v]
                   detect,run,ls,cat,pull,push,rm,mount} ...

Do stuff via the MicroPython REPL

positional arguments:
  {detect,run,ls,cat,put,rm,mount}
                        sub-command help
    detect              help locating a board
    run                 execute file contents on target
    ls                  list files
    cat                 print content of one file
    pull                file(s) to copy from target
    push                file(s) to copy onto target
    rm                  remove files on target
    mount               Make target files accessible via FUSE

optional arguments:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  set the serial port
  -b BAUDRATE, --baudrate BAUDRATE
                        set the baud rate
  -c COMMAND, --command COMMAND
                        execute given code on target
  -i, --interactive     drop to interactive shell at the end
  -u USER, --user USER  response to login prompt
  -w PASSWORD, --password PASSWORD
                        response to password prompt
  -v, --verbose         show diagnostic messages, repeat for more
  --develop             show tracebacks on errors (development of this tool)

The -c option executes the given string after running all the actions. The -i option enters a miniterm session at the end of all other actions.

The tool automatically selects a USB port for communication, it may take the wrong one if multiple USB serial devices are connected. In that case, use there detect to list all devices and then -p PORT to specify the port to use on the other calls.

Use python3 -m there <action> --help to get help on sub-commands.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpy-repl-tool-0.2.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

mpy_repl_tool-0.2-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file mpy-repl-tool-0.2.tar.gz.

File metadata

  • Download URL: mpy-repl-tool-0.2.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mpy-repl-tool-0.2.tar.gz
Algorithm Hash digest
SHA256 f0904a2499a72b88345f87d59a615650ec8a27358743d436caf6c5f3e31f755c
MD5 d7f2bcdb2097ee8392c1d30fd526ee23
BLAKE2b-256 65448162b2bf706d8c5cddf4a5f3cb9c855eb33b0fa7512cd5b7d93f09ddc7cb

See more details on using hashes here.

File details

Details for the file mpy_repl_tool-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mpy_repl_tool-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ca2a410e6e51c33cb3f04cb66ba200ea1e6cc04df0e6d62ebced5c38c184ad77
MD5 f89c7d81953262d833a23592ad158894
BLAKE2b-256 73f3d46fbf3ba7c56dc9f617cfd802a500d40af5e23c5c36fb16db5db33b78db

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page