Skip to content

Commit 6fba1e4

Browse files
vshymanskyydpgeorge
authored andcommitted
tools/mpy-tool.py: Support calling main() from an external script.
Signed-off-by: Volodymyr Shymanskyy <vshymanskyi@gmail.com> Signed-off-by: Angus Gratton <angus@redyak.com.au>
1 parent e1b2f2e commit 6fba1e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/mpy-tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,7 +1765,7 @@ def copy_section(file, offset, offset2):
17651765
f.write(merged_mpy)
17661766

17671767

1768-
def main():
1768+
def main(args=None):
17691769
global global_qstrs
17701770

17711771
import argparse
@@ -1797,7 +1797,7 @@ def main():
17971797
)
17981798
cmd_parser.add_argument("-o", "--output", default=None, help="output file")
17991799
cmd_parser.add_argument("files", nargs="+", help="input .mpy files")
1800-
args = cmd_parser.parse_args()
1800+
args = cmd_parser.parse_args(args)
18011801

18021802
# set config values relevant to target machine
18031803
config.MICROPY_LONGINT_IMPL = {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy