0

I compiled a .py file into a python byte code single executable file using py2exe according to the instructions here. Accordingly, my setup file looks like so:

from distutils.core import setup
import py2exe, sys, os

sys.argv.append('py2exe')

setup(
    options = {'py2exe': {'bundle_files': 1, 'compressed': True}},
    windows = [{'script': "single.py"}],
    zipfile = None,
)

But now I have the annoying console window, which was easily solved using one of these solutions.

  • change .py extension to .pyw
  • change console to window in set up e.g. setup(windows=["main.py"])

But now these solutions no longer work.

Community
  • 1
  • 1
the_prole
  • 8,275
  • 16
  • 78
  • 163
  • Stupid question: have you tried `.pyw` and using `console` at the same time? <--This is on the same lines of "Is it plugged in?" –  Nov 25 '14 at 20:55
  • @AHuman Yep, tried this one as well. – the_prole Nov 25 '14 at 20:57
  • http://ginstrom.com/scribbles/2007/09/12/running-a-python-script-on-windows-without-the-console/ <--Might help –  Nov 25 '14 at 21:00
  • @AHuman these solutions work, but only with a setup file that doesn't create a single executable. I change my questions to make that part clear. – the_prole Nov 25 '14 at 21:30

0 Answers0