python scripts to exe

1)Download pyinstaller2.0.


2)Unzip to C: (or anywhere you want to install) *you may need to download pywin32 and install it.


3)Open cmd (in Windows) and give the command:


 python Path\to\pyinstallerDirectory\pyinstaller.py Path\to\yourScript.py 


e.g. python C:\pyinstaller-2.0\pyinstaller.py -F -w -n compiledTest D:\sbox\test.py


 *You can add options in the end of the line. Allowed opetions

 -F, –onefile

Create a single file deployment


 -w, –windowed, –noconsole

Windows does not open the console when the program is launched.


-n NAME–name=NAME

Optional name to assign to the project 


-o DIR, –out=DIR

Create the spec file in directory.


4) You see two directory where you are execute the command in cmd.

-build

-dist

You can find your exe file in dist directory.

You can delete build directory.

You may also like...

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です