python command

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
plinio_pereira
Posts: 1
Joined: Tue Jan 23, 2018 1:24 pm

python command

Post by plinio_pereira » Tue Jan 23, 2018 1:42 pm

Hi everyone!
I have a question and probably is a dumb one. I'm new in python and microPython and I just realized from the video in the main page (4'10") of this website that I can run a "test" script using the command "python pyboard.py test.py". Well, I figure out that python is a instruction of the python interpreter used to run any script but I tryed to do it from the pyboard and it's not recognized as a valid command. Can someone explain me what does that line do and where the file "pyboard.py" is?
Thanks!

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: python command

Post by Roberthh » Tue Jan 23, 2018 2:03 pm

"python pyboard.py test.py" is a command you run on your PC while the pyboard is connected.
If you have already a file called test.py on your pyboard, you would run it with
import test.py
from the REPL prompt of pyboard.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: python command

Post by dhylands » Tue Jan 23, 2018 6:20 pm

pyboard.py can be found in the tools directory (i.e. https://github.com/micropython/micropyt ... ster/tools)

Post Reply