How to get others to use my Python Script

I just finished with my script in Python and I want my colleagues to use it. It works in python 2.7 Windows 7 64-bit professional env. Now the question is:

How can I use their script in simple form?

  • The first choice is the hard way, forcing them to install python on their machines, and then install paramiko, Tkinter. It was very difficult for me to find and install these modules (especially for Windows binaries), and you would not want to experience the same problems again.

  • I am new to this environment and I think there will be practical solutions to this problem. So I wanted to ask you guys any ideas were appreciated.

+4
source share
4 answers

use cx_freeze, I checked it.

cx_Freeze is the module used to create python scripts in an executable file (.exe). This is a very easy way.

  • Download and install cx_Freeze windows binary for your python version from http://www.lfd.uci.edu/~gohlke/pythonlibs/

  • Find the location of the source folder. for example, I created test.py and saved it in c: \ samp. C: \ SAMP \ test.py

    x="hai this is an exe file created from python scripts using cxfreeze. Press Enter to exit >> " y=input(x) 
  • Create a folder to store the assembly file (.exe and other files). For example, I created the folder c: \ samp \ build \

  • Open a command prompt (start-> run type "cmd" press enter) and type console

    C: \ Documents and Settings \ suh> c: \ python32 \ scripts \ cxfreeze c: \ samp \ test.py --target-dir = c: \ samp \ build

for additional options like C:\Documents and Settings\suh>c:\python32\scripts\cxfreeze -help

+1
source

You can use py2exe (windows), py2app (Mac OS X) or cx_freeze to convert your application into an executable file.

cx_freeze is a cross platform and should work on any platform that Python itself runs on.

+7
source

You need to convert it to an executable file. py2exe is the module that does this for you.

Follow the instructions here .

+3
source

Pyinstaller is the creator of python.exe with which I have been most successful → http://www.pyinstaller.org/

+1
source

Source: https://habr.com/ru/post/1487881/


All Articles