Hi all,
I know that to hide a console normally you simply change the extension
from .py to .pyw. That's simple enough. However I can't seem to
accomplish the same thing after freezing the program. I've tried
building the setup file with the python script as a .pyw file, but it
crashes and doesn't give me a reason. This is of course because the
debug window doesn't open, so you don't know what happened (ahh, the
irony).
Does anyone know how to successfully freeze a program with py2exe?
Many thanks,
Marc 3 6555
# setup.py
from distutils.core import setup
import py2exe
setup(name="convertdpi",
scripts=["convertdpi.pyw"],
)
From the dos command prompt:
c:\python23> python.exe setup.py py2exe
This works for me.
Hope it helps,
Arjen
"Marc" <mn******@airmail.net> schreef in bericht
news:43**************************@posting.google.c om... Hi all,
I know that to hide a console normally you simply change the extension from .py to .pyw. That's simple enough. However I can't seem to accomplish the same thing after freezing the program. I've tried building the setup file with the python script as a .pyw file, but it crashes and doesn't give me a reason. This is of course because the debug window doesn't open, so you don't know what happened (ahh, the irony).
Does anyone know how to successfully freeze a program with py2exe?
Many thanks, Marc
duikboot wrote: # setup.py from distutils.core import setup import py2exe
setup(name="convertdpi", scripts=["convertdpi.pyw"], )
From the dos command prompt: c:\python23> python.exe setup.py py2exe
Hi
or instead
# setup.py
from distutils.core import setup
import py2exe
setup(name="convertdpi",
scripts=["convertdpi.py"],
)
c:\python23> python.exe setup.py py2exe -w
Which works for me :)
All options are described on http://starship.python.net/crew/theller/py2exe/
Regards
Jorgen This works for me.
Hope it helps,
Arjen "Marc" <mn******@airmail.net> schreef in bericht news:43**************************@posting.google.c om...
Hi all,
I know that to hide a console normally you simply change the extension from .py to .pyw. That's simple enough. However I can't seem to accomplish the same thing after freezing the program. I've tried building the setup file with the python script as a .pyw file, but it crashes and doesn't give me a reason. This is of course because the debug window doesn't open, so you don't know what happened (ahh, the irony).
Does anyone know how to successfully freeze a program with py2exe?
Many thanks, Marc
The way to prevent a py2exe program from throwing up
a console is to pass the '--windows' option to it.
i.e change your py2exe command line from
%python setup.py py2exe
to
%python setup.py py2exe --windows
HTH.
-Anand mn******@airmail.net (Marc) wrote in message news:<43**************************@posting.google. com>... Hi all,
I know that to hide a console normally you simply change the extension from .py to .pyw. That's simple enough. However I can't seem to accomplish the same thing after freezing the program. I've tried building the setup file with the python script as a .pyw file, but it crashes and doesn't give me a reason. This is of course because the debug window doesn't open, so you don't know what happened (ahh, the irony).
Does anyone know how to successfully freeze a program with py2exe?
Many thanks, Marc This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jerry chapman |
last post by:
Several years ago I wrote a console program in Visual C++, which I am still
using. In converting this program to C#, I have encountered the following
problems:
1. I build my console display in...
|
by: ZhangZQ |
last post by:
How to make the Windows to run a console program during OS startup, like the
Chkdsk program to do when the OS does not shutdown properly? Now I want to
run my program instead of Chkdsk during the...
|
by: Thomas |
last post by:
Hi,
I have written a simple console program in VS2005 and it should run on
computers that dosn't have .NET (not 1.1 and not 2.0).
I think it depends on the headerfiles? I have exculded the...
|
by: Marin |
last post by:
Right now my solution to this is adding Console.ReadLine at the end but I'm
wondering if it's possible to do it automatically?
If I chose "Start without debug" it does just that, it pauses right...
|
by: JohnMoulding |
last post by:
Hi,
I'm a newbie, so apologies for missing the obvious... and I have searched for an answer to this question, but all I get is "how to call an external program from a C# program" - which is not...
|
by: =?Utf-8?B?Q1IgU3VwcG9ydA==?= |
last post by:
Hi experts,
We are trying to migrate from Visual Studio 6 (C++ project) on Windows 2000
to Visual Studio 2005 SP1 on Windows Vista but found that the migrated
program runs slower in both OS.
A...
|
by: =?Utf-8?B?SmFtZXMgV29uZw==?= |
last post by:
Dear all,
I'd like to know if there is any method to minimize command mode window when
a console program is running. In my case, there are several console programs
which run periodically in...
|
by: Mufasa |
last post by:
I used to work with somebody who wrote services that if you ran them from a
console prompt with a -console it would run writing things to the screen as
a normal console program. I'm sure he...
|
by: PRR |
last post by:
I have a console program.. which i need to convert to a windows service...
My basic requirement is that the program needs to run in background and consume as less memory n CPU time as possible..I am...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |