Results 1 to 3 of 3

Thread: [SOLVED] py2exe Hide Console

  1. #1
    Join Date
    Aug 2006
    Location
    Pittsburgh, PA
    Beans
    424
    Distro
    Ubuntu 10.04 Lucid Lynx

    [SOLVED] py2exe Hide Console

    I'm using Py2Exe to turn a python program into a Windows exe. I know this is probably not a popular idea, but I have to do it since I cannot be sure the computer will have python on it.

    Rest assured that the first thing that this exe does is install python 2.5 and setup the python path environment variable. This way in the future I can assume python will be there!

    Anyways, the problem is that even though it's a GUI App built on TK, it still shows the console when compiled with Py2Exe. I even tried changing the extensions to .pyw

    Any ideas? I know most of us don't like Windows XP, but sadly my employer does not share that feeling...

  2. #2
    Join Date
    Apr 2006
    Location
    Slovenia
    Beans
    370
    Distro
    Ubuntu Development Release

    Re: py2exe Hide Console

    I had the same problem today (however I was using pygtk). I changed app.py to app.pyw and modify the "setup.py" py2exe script from:

    PHP Code:
    from distutils.core import setup
    import py2exe
    setup
    (console=['app.py']) 
    to:

    PHP Code:
    from distutils.core import setup
    import py2exe
    setup
    (windows=['app.py']) 
    I hope it helps.

  3. #3
    Join Date
    Aug 2006
    Location
    Pittsburgh, PA
    Beans
    424
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: py2exe Hide Console

    That worked, thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •