Search code examples
pythonpy2execx-freeze

Getting file (exe) when converting a .py to exe


I have a python file that I want to convert to an exe. It has icons, Pictures and other files that it loads up. It also used Tkinter, PILLOW, webrowser, os, sys, win32api, and platform. I want it to create ONE file that I can send to someone, without the hassle of having it buried in a ton of files. I also want to protect some of the applications that it calls upon and icons blah blah blah, I can't do that when their in a folder that anyone can access. These are contained in the "recources" folder. To clarify, I want my converted file to look like figure 1 and not like figure 2. Any ideas?

Figure 1: https://gyazo.com/e7c41fd20444d9a5b3cd938ea9bf3873

Figure 2: https://gyazo.com/69782b3e60b4d5f111baadea0d37ba8a


Solution

  • Pyinstaller. Your mileage may vary on the size of the exe but I liked it for my dinky programs at work!