Hide black console window

Step1: First package according to common procedures

Need pyinstaller
example:
First reach the location of this scripts
cd C:\Python27\Scripts
Then enter

pyinstaller -F D:\Wayne\file.py --distpath D:\Wayne
At this time, the folder will be generated on the desktop. build, dist
There is also a protagonist of "Archive.spec"
Open "Profile.spec" with Notepad
One of them is like this

Exe = EXE(pyz,
          A.scripts,
          A.binaries,
          A.zipfiles,
          A.datas,
          [],
          Name='my file',
          Debug=False,
          Bootloader_ignore_signals=False,
          Strip=False,
          Upx=True,
          Runtime_tmpdir=None,
          Console=True )
Change the console=True to console=False

Step2: Repackageirst

Note that this packaged project is a .spec file.
First reach the location of this scripts

cd C:\Python27\Scripts
Then enter
pyinstaller -F D:\Wayne\file.spec --distpath D:\Wayne

You're done, your file will not have a small black frame when you go down.

留言

這個網誌中的熱門文章

Blocking software access to the Internet

Automatically classify folders by file name (windows Bash)

Esxi increase hard drive size (Ubuntu none LVM)