I've already written a python program, I have no idea how to usb mount so would it be easier putting it on my microsd card used to boot my pi up? My pi is using raspbian-jessie-lite and i don't understand any commands in great depth. So all I want to do is run a python file off my raspberry pi.. please help.

  • 1
    Can't you network the Pi? – joan Apr 21 '17 at 11:24
  • I'm using it with putty to control it – montymagic9 Apr 21 '17 at 11:26
  • 2
    Perhaps putty has a command to copy a file similar to the sftp command used by the ssh suite? – joan Apr 21 '17 at 11:29
  • This Q&A discusses the PuTTY file transfer tools. superuser.com/questions/338075/… But FileZilla is easier to use. – SDsolar Apr 21 '17 at 16:32
  • If you intend to run your program as a command you will want to use the "which python" command to get the string for the shebang (#!) for the first line of the file. Then you can use "chmod +x <filename>" to make it executable. It does not need the .py extension when you do it this way. – SDsolar Apr 21 '17 at 16:34

connect via sftp(FileZilla) to your rasppberry pi and just upload a file. then connect to the raspberry via ssh and cd to the path where you uploaded your file and run command python YourFile.py

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.