Jonas
Jonas

Reputation: 395

py2exe doesnt create windows executable(.exe)file ,Console window appears and vanishes soon when i press Exe file

This is what i have tried till now is : I have created a setup.py file and in this written the following code.

#setup.py
from distutils.core import setup
import py2exe 
import time 
setup(console=['myprogram.py']) 
time.sleep(2)

then in command prompt i entered into working directory and run this command

**python setup.py install** 
**python setup.py py2exe**

But when i click on the exe file the console window appears and vanishes soon. Can anyone suggest where i went wrong. I am using python 2.7.6, IDLE.Advance thanks. I googled with no much help . Is there anything to do with dll or the python path??? I may have done some changes. My program consists of openCV code and tkinter code for creating GUI in python. I thought time.sleep(2) would had been the problem , but its not the issue, i tried checking it.

Upvotes: 1

Views: 156

Answers (1)

Alex
Alex

Reputation: 1151

The console window is your application. I don't know what it should do but it think that it vanishes because of some exception. Add a logging or something so you will be able to see what goes wrong there.

Upvotes: 1

Related Questions