0

I was wondering if you can directly open them by clicking on something, etc. So you dont have to write the whole "cd (directory)" then "python (filename)". On Windows you can do this simply by double clicking the file, but I don't know for linux.

Thanks in advance.

4
  • It would depend on your window and/or file manager, I would think. Commented May 3, 2020 at 22:24
  • BTW you don't have to type python filename to run a script - see stackoverflow.com/questions/15587877/… Commented May 3, 2020 at 22:28
  • On Linux you should be able to insert #!/usr/bin/python as the first line of your Python script, make it executable (chmod a+x file.py), then enter the path to run it. Probably you can do so directly from your file explorer (not sure), but you can certainly create a launcher for it. Commented May 3, 2020 at 22:32
  • Cross-site duplicate: superuser.com/questions/828737/… Commented May 3, 2020 at 23:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.