分享

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.  
#技術分享  #拾人牙慧 
分類:學習

評論
上一篇
  • 下一篇
  • 更多文章
    載入中... 沒有更多了