Making a pyw. extension to no show your command console window

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karimspencer
    New Member
    • Mar 2012
    • 6

    #1

    Making a pyw. extension to no show your command console window

    Can you guys give me the steps on how to do that. At first, i tried creating a program with the pyw. extension , when i open the program , i wouldn't show the console window however when finalize it using Py2exe , the console comes back. Can you guys find me a solution to my problem.

    Thank you!!!
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    In Pyinstaller, it's an option to not show the console. The spec file looks something like this:
    Code:
    exe = EXE(TkPKG(), pyz,
              a.scripts,
              a.binaries,
              a.zipfiles,
              a.datas,
              name=os.path.join('dist', 'hiproof.exe'),
              debug=False,
              strip=False,
              upx=True,
              console=False)
    I think Py2exe has a similar option.

    Comment

    • karimspencer
      New Member
      • Mar 2012
      • 6

      #3
      when i added this code onto my program , it gave me an error

      Comment

      • bvdet
        Recognized Expert Specialist
        • Oct 2006
        • 2851

        #4
        That code was for Pyinstaller. The spec file is generated from the Makespec.py script. You need to read the documentation of Py2exe.

        Comment

        Working...