Closed nmerekat closed 7 years ago
#!/usr/bin/env python
should be
#!/usr/bin/env python3
And if you are using Windows to edit the file, make sure you save it using Unix line endings, not Windows line endings.
Thank you for the help, dlech! When I changed that line, the asterisk appeared and I was able to execute the code from File Browser. I am using a Mac, so I'm fine for the line endings. I can't believe I missed that... Again, thank you for spotting that!
I'm new to python and to ev3dev. I have transferred a file, motor3.py, into the home/robot folder, using FileZilla. motor3.py is pasted below:
Right now, when I establish an ssh connection, I can execute the program from Terminal. I first enter the line:
robot@ev3dev:~$ chmod u+x motor3.py
or
robot@ev3dev:~$ chmod +x motor3.py
Ive tried both, and had success running motor3.py from Terminal using the line:
robot@ev3dev:~$ python3 motor3.py
But I need to be able to execute this motor test program from the Brickman File Browser, and I have not been able to. In the File Browser, motor3.py does not have an * after it, which means it isn't executable? I made sure to set the permissions when in FileZilla, but I still do not see an asterisk after motor3.py
I've been reading through the issues page and I've included the "shebang" and wrapped my code with the if name ... statement, but am I missing a step? How can I execute the above code directly from File Browser?
What hardware and software are you using (including version numbers)?