Re: [Py2exe-users] how to build same executabl with and without console output
On Fri, Jul 30, 2010 at 1:10 AM, Gelonida gelon...@gmail.com wrote: What I'd like to achieve ideally is to create a py2exe program, which will only display a window (so 'compiled' as 'windows'-application) if called normally. however if being called with the option --debug it should display the graphical window plus a debug console where I can print to. Is there any trick in adding a console window to an application, that was built as 'windows' application? If above is not possible: Is there any way to compile the same python script (myprog.py) from one py2exe script into once a 'windows' executable (myprog.exe) and once into a 'console' executable (myprog_debug.exe)? I can't think of an easy way to achieve the first approach - I've always taken the second approach. The advanced example included with py2exe has an example of how to do this. Look at all the occurrences of test_wx in the following link to see all the pieces involved: http://py2exe.svn.sourceforge.net/viewvc/py2exe/trunk/py2exe/py2exe/samples/advanced/setup.py?view=markup This uses an alternate form of the windows and console arguments where each target is an object with specially named member variables rather than a string that names the .py file (this string is one of the member variables). This is necessary so you can give different names to the console version and the windows version. Jimmy -- http://mail.python.org/mailman/listinfo/python-list
Re: [Py2exe-users] how to build same executabl with and without console output
Is there any trick in adding a console window to an application, that was built as 'windows' application? I was recently wondering the same thing myself. My research indicates that its not possible to have a single Windows application that can run in both console and GUI (Windows) modes. Here are 2 links that explain this in more detail. http://stackoverflow.com/questions/493536/can-one-executable-be-both-a-console-and-gui-app http://objectmix.com/delphi/403126-sending-output-stdout-non-console-app.html Malcolm -- http://mail.python.org/mailman/listinfo/python-list
Re: [Py2exe-users] how to build same executabl with and without console output
pyt...@bdurham.com wrote: Is there any trick in adding a console window to an application, that was built as 'windows' application? I was recently wondering the same thing myself. My research indicates that its not possible to have a single Windows application that can run in both console and GUI (Windows) modes. Here are 2 links that explain this in more detail. http://stackoverflow.com/questions/493536/can-one-executable-be-both-a-console-and-gui-app http://objectmix.com/delphi/403126-sending-output-stdout-non-console-app.html Malcolm Since we're talking MS Windows here, see: http://msdn.microsoft.com/en-us/library/ms682528(VS.85).aspx You can access the AllocConsole and related functions with the win32 module: win32console This module is part of the win32 extensions, and also part of ActivePython distribution. DaveA -- http://mail.python.org/mailman/listinfo/python-list
Re: [Py2exe-users] how to build same executabl with and without console output
Hi, On 07/30/2010 03:51 PM, Dave Angel wrote: pyt...@bdurham.com wrote: Is there any trick in adding a console window to an application, that was built as 'windows' application? ,,, Since we're talking MS Windows here, see: http://msdn.microsoft.com/en-us/library/ms682528(VS.85).aspx You can access the AllocConsole and related functions with the win32 module: win32console This module is part of the win32 extensions, and also part of ActivePython distribution. Thanks a lot for your answer I'll check this out. -- http://mail.python.org/mailman/listinfo/python-list
Re: [Py2exe-users] how to build same executabl with and without console output
On 07/30/2010 11:00 AM, Jimmy Retzlaff wrote: On Fri, Jul 30, 2010 at 1:10 AM, Gelonida gelon...@gmail.com wrote: What I'd like to achieve ideally is to create a py2exe program, which will only display a window (so 'compiled' as 'windows'-application) if called normally. ... Is there any way to compile the same python script (myprog.py) from one py2exe script into once a 'windows' executable (myprog.exe) and once into a 'console' executable (myprog_debug.exe)? I can't think of an easy way to achieve the first approach - I've always taken the second approach. The advanced example included with py2exe has an example of how to do this. Look at all the occurrences of test_wx in the following link to see all the pieces involved: http://py2exe.svn.sourceforge.net/viewvc/py2exe/trunk/py2exe/py2exe/samples/advanced/setup.py?view=markup This uses an alternate form of the windows and console arguments where each target is an object with specially named member variables rather than a string that names the .py file (this string is one of the member variables). This is necessary so you can give different names to the console version and the windows version. Thanks, I'll read thorugh it. -- http://mail.python.org/mailman/listinfo/python-list
py2exe users
I have used py2exe many times with success. My current program is completing as expected but the exe file fails to open. The output file states that _imaging_gif is missing. I can run the program ok with IDLE but after converting with py2exe, the exe file just sits there. I'm using 2.6 on win XP. Any Ideas? jim-on-linux -- http://mail.python.org/mailman/listinfo/python-list
Re: [Py2exe-users] installer for py2exe files?
Gabriel Rossetti wrote: Hello everyone, I am wanting to create an installer for my project. I first use py2exe to create win32 executables and then would like to have an easy to use (for the end user) installer. I would need the installer to launch a script (a python script also turned into an exec) after the install is done, or even better yet, incorperate the script's tasks in the installation process (configure files, check for open ports, etc.). Does anyone have an idea, recommendation or has had a similar situation before? Thanks! Gabriel Have a look at NSIS, it's an opensource project -- Yann -- http://mail.python.org/mailman/listinfo/python-list
Re: [Py2exe-users] installer for py2exe files?
Gabriel Rossetti wrote: Hello everyone, I am wanting to create an installer for my project. I first use py2exe to create win32 executables and then would like to have an easy to use (for the end user) installer. I would need the installer to launch a script (a python script also turned into an exec) after the install is done, or even better yet, incorperate the script's tasks in the installation process (configure files, check for open ports, etc.). Does anyone have an idea, recommendation or has had a similar situation before? Thanks! Gabriel Thank you for your answers, I think that I'm going to use NSI since it has a great eclipse plugin that helps out a lot and can create forms and all. Gabriel -- http://mail.python.org/mailman/listinfo/python-list
Re: [Py2exe-users] py2exe 0.6.9 released
On Mon, 17 Nov 2008 12:39:36 +, Pascal wrote: On Sun, 16 Nov 2008 21:23:59 -0500, Chris Spencer wrote: After I compile my program with py2exe 0.6.9 with Python 2.6, I'm still getting the Application Did Not Initialize Properly error dialog whenever I run my code. What am I doing wrong? I have exactly the same problem. I have tried just anything I could think of to no avail : Copied the 3 msvc_90.dll to the system32 subdir of Windows, to the directory of my application, reinstalled the whole Microsoft Visual C++ 2008 Redistributable Package, embedded the manifest data into the exe or kept it in a .manifest file... Could not make it work. Always got the Application Did Not Initialize Properly message. I'm with Windows XP SP3. I tried all this on 2 different systems and I got the same results. I think I narrowed down a little bit the problem. It's not the common one when the msvc_90.dll are not located, though the result is similar. The problem is when you try to generate at least 2 exe in one setup (with 2 scripts specified in the windows command of the setup). This works OK with py2exe 0.6.9 for Python 2.5, but fails with Python 2.6 (and 2.6.1). None of the generated exe can be started. When I compare the content of library.zip in both versions, this file doesn't contain any .pyc for the scripts you want to generate an exe for with Python 2.5, but always contains a .pyc for one of the scripts you want to generate an .exe for with Python 2.6. Don't know if it's a clue for finding a fix. I have tested many ways to figure this out but I can't find any solution for the moment so I'm sticking with Python 2.5. -- http://mail.python.org/mailman/listinfo/python-list
Re: [Py2exe-users] py2exe 0.6.9 released
On Mon, 08 Dec 2008 14:47:13 +, Pascal wrote: On Mon, 17 Nov 2008 12:39:36 +, Pascal wrote: On Sun, 16 Nov 2008 21:23:59 -0500, Chris Spencer wrote: After I compile my program with py2exe 0.6.9 with Python 2.6, I'm still getting the Application Did Not Initialize Properly error dialog whenever I run my code. What am I doing wrong? I have exactly the same problem. I have tried just anything I could think of to no avail : Copied the 3 msvc_90.dll to the system32 subdir of Windows, to the directory of my application, reinstalled the whole Microsoft Visual C++ 2008 Redistributable Package, embedded the manifest data into the exe or kept it in a .manifest file... Could not make it work. Always got the Application Did Not Initialize Properly message. I'm with Windows XP SP3. I tried all this on 2 different systems and I got the same results. I think I narrowed down a little bit the problem. It's not the common one when the msvc_90.dll are not located, though the result is similar. The problem is when you try to generate at least 2 exe in one setup (with 2 scripts specified in the windows command of the setup). This works OK with py2exe 0.6.9 for Python 2.5, but fails with Python 2.6 (and 2.6.1). None of the generated exe can be started. When I compare the content of library.zip in both versions, this file doesn't contain any .pyc for the scripts you want to generate an exe for with Python 2.5, but always contains a .pyc for one of the scripts you want to generate an .exe for with Python 2.6. Don't know if it's a clue for finding a fix. I have tested many ways to figure this out but I can't find any solution for the moment so I'm sticking with Python 2.5. Got it ! If you want to generate an exe for a script of your own named abc.py, rename it because this will never work with that original name. The reason seems to be an abc.pyc file compiled by default by Python 2.6 and included in library.zip (abc stands in this case for Abstract Base Classes), and using this name for your own script makes nothing work ! -- http://mail.python.org/mailman/listinfo/python-list
Re: [Py2exe-users] py2exe 0.6.9 released
On Sun, 16 Nov 2008 21:23:59 -0500, Chris Spencer wrote: After I compile my program with py2exe 0.6.9 with Python 2.6, I'm still getting the Application Did Not Initialize Properly error dialog whenever I run my code. What am I doing wrong? I have exactly the same problem. I have tried just anything I could think of to no avail : Copied the 3 msvc_90.dll to the system32 subdir of Windows, to the directory of my application, reinstalled the whole Microsoft Visual C++ 2008 Redistributable Package, embedded the manifest data into the exe or kept it in a .manifest file... Could not make it work. Always got the Application Did Not Initialize Properly message. I'm with Windows XP SP3. I tried all this on 2 different systems and I got the same results. If anyone can give some help... -- http://mail.python.org/mailman/listinfo/python-list
Re: [Py2exe-users] py2exe 0.6.9 released
After I compile my program with py2exe 0.6.9 with Python 2.6, I'm still getting the Application Did Not Initialize Properly error dialog whenever I run my code. What am I doing wrong? Note that py2exe 0.6.9 with Python 2.5 works just fine. Help! Chris. On Sat, 15 Nov 2008 23:21:15 -0800, Jimmy Retzlaff [EMAIL PROTECTED] wrote: py2exe 0.6.9 released = -- http://mail.python.org/mailman/listinfo/python-list
RE: [Py2exe-users] py2exe 0.6.9 released
After I compile my program with py2exe 0.6.9 with Python 2.6, I'm still getting the Application Did Not Initialize Properly error dialog whenever I run my code. What am I doing wrong? This probably means the Microsoft VC90 binaries aren't installed globally on your machine - which would imply they are installed locally in the \Python26 directory by the python 2.6 installer (I haven't checked that though - I tend to not use the installers). In that case, a solution would be to copy the files Microsoft.VC90.CRT.manifest, msvcm90.dll, msvcp90.dll and msvcr90.dll from the Python directory into your app's directory. Your installer will need to arrange for these to be installed with your app (assuming you have the rights to redistribute them) or you can download the installer from MS which installs them globally. Hope this helps, Mark -- http://mail.python.org/mailman/listinfo/python-list
Re: [Py2exe-users] Re: Getting tired with py2exe
On Sep 20, 2005, at 5:44 PM, Steve Holden wrote: Thomas Heller wrote: I'm slowly getting tired maintaining py2exe. It is far from perfect, although it has interesting features (I would say). The problem, apart from the work, is that it is good enough for me - I can do everything that I need with it. But I assume I use far less libaries than other Python programmers, so a lot of bugs will never bite me. It is also interesting that the recently introduced bundle-files option, which allows to build single-file exes has gained a lot of interest - although the ONLY use case (so far) I have myself for it is to implement inproc COM servers which will compatible with Python clients (and other Python inproc COM servers) because of the total isolation of the Python VMs. Is anyone interested in taking over the maintainance, documentation, and further development? Should py2exe be integrated into another, larger, package? Pywin32 comes to mind, but also Philip Eby's setuptools (that's why I post to distutils-sig as well)... Ignoring all the philosophical questions I'd like to thank you for all your hard work on py2exe over the years, which has benefited the Windows Python community immeasurably. I'd like to thank you as well. Although I'm primarily a Mac OS X (and various other *nix-ish things) user myself, I have used py2exe on several occasions to package a commercial product and to give various one-off applications to clients. py2exe was also a large inspiration for py2app (which I have been neglecting lately). py2exe (and py2app) currently do everything I need them do (albeit with a little prodding), so that's why I've done so little with it in the past few months. I hope that the packager-future will be largely setuptools based and that the various platform-specific packagers will share a lot more code in the future (setuptools, modulegraph, etc.), making maintenance easier and more fun for everyone. This was my primary use case when I was initially discussing the egg spec with PJE back around pycon-time (though I have been unfortunately useless implementing and evolving it). Right now, I think the packagers and the packages are at odds, because the packagers need metadata that the packages don't provide (in a pre-setuptools universe)... so right now users (or the packagers) need to know a lot of magic incantations to make the various complicated Python packages work, where with setuptools based packages the magic incantations are built-in :) -bob -- http://mail.python.org/mailman/listinfo/python-list
Re: [Py2exe-users] py2exe 0.6.2 released
Ray Schumacher [EMAIL PROTECTED] writes: First, Thanks again for the update. At 08:55 AM 9/7/2005, Thomas Heller wrote: This part of the code is distributed under the MPL 1.1, so this license is now pulled in by py2exe. As I read it, it seems that I need to include an Exibit A http://www.mozilla.org/MPL/MPL-1.1.html#exhibit-a filled out so that it includes the py2exe home, as well as Python, probably. It could be put in the Zip or Rar to be viewed on extraction. Does this sound correct? Probably. But IANAL. Thomas -- http://mail.python.org/mailman/listinfo/python-list
Re: [Py2exe-users] py2exe 0.6.2 released
First, Thanks again for the update. At 08:55 AM 9/7/2005, Thomas Heller wrote: This part of the code is distributed under the MPL 1.1, so this license is now pulled in by py2exe. As I read it, it seems that I need to include an Exibit A http://www.mozilla.org/MPL/MPL-1.1.html#exhibit-a filled out so that it includes the py2exe home, as well as Python, probably. It could be put in the Zip or Rar to be viewed on extraction. Does this sound correct? Ray Schumacher -- http://mail.python.org/mailman/listinfo/python-list