-2

I have written a "random movie suggester" code that will basically read the files of the directory where the .py file is stored and randomly pick one of them and print it out.

My problem is -

How to make .py file simple to run for non-technical person? (e.g. I tried .bat but i had to hard code the path of the file).

Other solutions ask to install IDEs and run it.

  • 1
    Welcome to [Stack Overflow.](https://stackoverflow.com/ "Stack Overflow")! Questions that ask "where do I start?" are typically too broad and are not a good fit for this site. People have their own method for approaching the problem and because of this there cannot be a correct answer. Give a good read over [Where to Start](https://softwareengineering.meta.stackexchange.com/questions/6366/where-to-start/6367#6367), and [Minimal Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example "Minimal Reproducible Example") then edit your post. – itprorh66 Dec 21 '20 at 21:54

1 Answers1

1

First you have to install python on your computer. Then you can type in your terminal:

python [the file name or the path to access it]

But I don't think this is what you are looking for...
You can create a .exe file with your python program using the pyinstaller module then running this in your terminal.

pip pyinstaller
pyinstaller --onefile [the name of the file]

The first line installs the module using pip.
The second line will create a .exe file that does exactly the same as your python code.

willcrack
  • 1,794
  • 11
  • 20
Maxence LQ
  • 11
  • 3