Skip to content

Commit df41399

Browse files
committed
Run mpremote as module in same environment.
Signed-off-by: Jos Verlinde <[email protected]>
1 parent d9a681d commit df41399

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/micropython_magic/mpr.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33

44
import contextlib
55
import json
6+
import sys
67
import tempfile
78
from pathlib import Path
89
from typing import List, Optional, Union
910

1011
from IPython.core.interactiveshell import InteractiveShell
1112
from loguru import logger as log
13+
1214
from micropython_magic.script_access import path_for_script
1315

1416
from .interactive import ipython_run
@@ -37,8 +39,7 @@ def __init__(
3739
@property
3840
def cmd_prefix(self) -> List[str]:
3941
"""mpremote command prefix including port and resume according to options"""
40-
# return f"mpremote {self.connect_to}{'resume' if self.resume else ''} "
41-
prefix = ["mpremote"] + self.connect_to
42+
prefix = [sys.executable, "-m", "mpremote"] + self.connect_to
4243
if self.resume:
4344
prefix.append("resume")
4445
return prefix

0 commit comments

Comments
 (0)