Closed cecchisandrone closed 5 years ago
I don't know ampy but you can use the REPL console (>>>) if this is what you are looking for.
That is correct, you can use the REPL and run whatever script is on the microcontroller.
I don't know ampy but you can use the REPL console (>>>) if this is what you are looking for.
What is the command?
Have you tried to use ?
orhelp
commands ?
It's there, hidden in plain sight:
I mean running a script from repl Il 28 mar 2019, 19:40 +0100, Barbudor notifications@github.com, ha scritto:
Have you tried to use ? orhelpcommands ? It's there, hidden in plain sight: — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Oh. Sorry for the misunderstanding and little moking.
That's not related to mpfshell itself. It would be the same whatever terminal you use (uPyCraft, Mu, ...)
I'm using import nameofscript
(without the .py) but not sure if that's the only way.
Note that import
is not just exactly 'running'. That's importing and compiling the code and executing the part of the code that is at the root level (outside of any def or class). Which means that you cannot re-import again to re-execute as the module has already been imported.
I suggest you move this question/discussion to MicroPython forum: https://forum.micropython.org/
Normally I do this in ampy (run command). The problem of that shell is that you see the output of the script only when it terminates, so I was trying to find an alternative. Il 28 mar 2019, 20:10 +0100, Barbudor notifications@github.com, ha scritto:
Oh. Sorry for the misunderstanding and little moking. That's not related to mpfshell itself. It would be the same whatever terminal you use (uPyCraft, Mu, ...) I'm using import nameofscript (without the .py) but not sure if that's the only way. Note that import is not just exactly 'running'. That's importing and compiling the code and executing the part of the code that is at the root level (outside of any def or class). Which means that you cannot re-import again to re-execute as the module has already been imported. I suggest you move this question/discussion to MicroPython forum: https://forum.micropython.org/ — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Hmm, I'm not entirely sure what you want to do. Do you want to run a script that's on the computer, or on the MPU?
On the MPU. Il 28 mar 2019, 23:29 +0100, Stavros Korokithakis notifications@github.com, ha scritto:
Hmm, I'm not entirely sure what you want to do. Do you want to run a script that's on the computer, or on the MPU? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Is it possible to run scripts using mpfshell (like run command in ampy)? Thanks.