Problem with wxPython and py2exe

When I run my setup.py script to create an EXE for my wxPython app, I get an error saying I’m missing MSVCP90.dll. I know this is a problem with wxPython because my game made with Pygame freezes into an EXE perfectly. Any ideas what could be wrong? I’m on Windows Vista and using Python 2.6.

Start here:
http://www.py2exe.org/index.cgi/Tutorial#Step5

That question gets asked by one of us about once a day on this list.

Michael

···

On 9/3/2010 9:06 PM, onpon4 wrote:

When I run my setup.py script to create an EXE for my wxPython app, I
get an error saying I'm missing MSVCP90.dll. I know this is a problem
with wxPython because my game made with Pygame freezes into an EXE
perfectly. Any ideas what could be wrong? I'm on Windows Vista and using
Python 2.6.

Wait… I’m confused. It seems to be making the assumption that I have Visual Studio installed. Am I missing something?

···

On Fri, Sep 3, 2010 at 10:15 PM, Michael Hipp Michael@hipp.com wrote:

On 9/3/2010 9:06 PM, onpon4 wrote:

When I run my setup.py script to create an EXE for my wxPython app, I

get an error saying I’m missing MSVCP90.dll. I know this is a problem

with wxPython because my game made with Pygame freezes into an EXE

perfectly. Any ideas what could be wrong? I’m on Windows Vista and using

Python 2.6.

Start here:

http://www.py2exe.org/index.cgi/Tutorial#Step5

That question gets asked by one of us about once a day on this list.

Michael

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

Has nothing to do with VS per se. (It comes about because Py2.6 was compiled with VS2010, you don't need it). You need to find your copies of the MS DLLs and their manifest, copy them somewhere convenient, then put the magic lines in setup.py so they are copied (along with the manifest) into your dist directory.

Here's an excerpt from my setup.py:

     data_files = [
         ('', glob(r'c:\dev\resources\ms-vc-runtime\*.*')),
         ],

Here's what is in the magic dir:

C:\dropbox\dev\resources\ms-vc-runtime>ls -lahtr
total 2.2M
-rwxr-xr-x 1 michael Administ 488k Mar 18 2003 msvcp71.dll
-rwxr-xr-x 1 michael Administ 1.0M Mar 18 2003 mfc71.dll
-rwxr-xr-x 1 michael Administ 640k Nov 7 2007 msvcr90.dll
-rwxr-xr-x 1 michael Administ 555k Nov 7 2007 msvcp90.dll
-rwxr-xr-x 1 michael Administ 1.7M Aug 8 2009 gdiplus.dll
-rw-r--r-- 1 michael Administ 501 May 21 16:26 Microsoft.VC90.CRT.manifest
drwxr-xr-x 2 michael Administ 4.0k Aug 25 17:07 .
drwxr-xr-x 10 michael Administ 4.0k Aug 26 06:55 ..

Clear as mud? :slight_smile:

Michael

···

On 9/3/2010 9:28 PM, onpon4 wrote:

Wait... I'm confused. It seems to be making the assumption that I have
Visual Studio installed. Am I missing something?

On Fri, Sep 3, 2010 at 10:15 PM, Michael Hipp <Michael@hipp.com > <mailto:Michael@hipp.com>> wrote:

    On 9/3/2010 9:06 PM, onpon4 wrote:

        When I run my setup.py script to create an EXE for my wxPython
        app, I
        get an error saying I'm missing MSVCP90.dll. I know this is a
        problem
        with wxPython because my game made with Pygame freezes into an EXE
        perfectly. Any ideas what could be wrong? I'm on Windows Vista
        and using
        Python 2.6.

    Start here:
    Tutorial - py2exe.org

    That question gets asked by one of us about once a day on this list.

    Michael

    --
    To unsubscribe, send email to
    wxPython-users+unsubscribe@googlegroups.com
    <mailto:wxPython-users%2Bunsubscribe@googlegroups.com>
    or visit http://groups.google.com/group/wxPython-users?hl=en

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

BTW, this series of questions prolly belongs on the py2exe list rather than here as it is not a wx issue per se. But I'm on both and tend to get them confused.

http://www.py2exe.org/

Michael

···

On 9/3/2010 9:28 PM, onpon4 wrote:

Wait... I'm confused. It seems to be making the assumption that I have
Visual Studio installed. Am I missing something?

On Fri, Sep 3, 2010 at 10:15 PM, Michael Hipp <Michael@hipp.com > <mailto:Michael@hipp.com>> wrote:

    On 9/3/2010 9:06 PM, onpon4 wrote:

        When I run my setup.py script to create an EXE for my wxPython
        app, I
        get an error saying I'm missing MSVCP90.dll. I know this is a
        problem
        with wxPython because my game made with Pygame freezes into an EXE
        perfectly. Any ideas what could be wrong? I'm on Windows Vista
        and using
        Python 2.6.

    Start here:
    Tutorial - py2exe.org

    That question gets asked by one of us about once a day on this list.

    Michael

OK, but there’s a problem: I did a search on my entire hard drive for MSVCR90.dll, and got no results. So… what now?

···

On Fri, Sep 3, 2010 at 10:47 PM, Michael Hipp Michael@hipp.com wrote:

Has nothing to do with VS per se. (It comes about because Py2.6 was compiled with VS2010, you don’t need it). You need to find your copies of the MS DLLs and their manifest, copy them somewhere convenient, then put the magic lines in setup.py so they are copied (along with the manifest) into your dist directory.

Here’s an excerpt from my setup.py:

data_files = [

    ('', glob(r'c:\dev\resources\ms-vc-runtime\*.*')),

    ],

Here’s what is in the magic dir:

C:\dropbox\dev\resources\ms-vc-runtime>ls -lahtr

total 2.2M

-rwxr-xr-x 1 michael Administ 488k Mar 18 2003 msvcp71.dll

-rwxr-xr-x 1 michael Administ 1.0M Mar 18 2003 mfc71.dll

-rwxr-xr-x 1 michael Administ 640k Nov 7 2007 msvcr90.dll

-rwxr-xr-x 1 michael Administ 555k Nov 7 2007 msvcp90.dll

-rwxr-xr-x 1 michael Administ 1.7M Aug 8 2009 gdiplus.dll

-rw-r–r-- 1 michael Administ 501 May 21 16:26 Microsoft.VC90.CRT.manifest

drwxr-xr-x 2 michael Administ 4.0k Aug 25 17:07 .

drwxr-xr-x 10 michael Administ 4.0k Aug 26 06:55 …

Clear as mud? :slight_smile:

Michael

On 9/3/2010 9:28 PM, onpon4 wrote:

Wait… I’m confused. It seems to be making the assumption that I have

Visual Studio installed. Am I missing something?

On Fri, Sep 3, 2010 at 10:15 PM, Michael Hipp <Michael@hipp.com > > mailto:Michael@hipp.com> wrote:

On 9/3/2010 9:06 PM, onpon4 wrote:



    When I run my setup.py script to create an EXE for my wxPython

    app, I

    get an error saying I'm missing MSVCP90.dll. I know this is a

    problem

    with wxPython because my game made with Pygame freezes into an EXE

    perfectly. Any ideas what could be wrong? I'm on Windows Vista

    and using

    Python 2.6.





Start here:

[http://www.py2exe.org/index.cgi/Tutorial#Step5](http://www.py2exe.org/index.cgi/Tutorial#Step5)



That question gets asked by one of us about once a day on this list.



Michael



--

To unsubscribe, send email to

wxPython-users+unsubscribe@googlegroups.com

mailto:wxPython-users%2Bunsubscribe@googlegroups.com

or visit [http://groups.google.com/group/wxPython-users?hl=en](http://groups.google.com/group/wxPython-users?hl=en)

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

OK, I subscribed to that mailing list.

···

On Fri, Sep 3, 2010 at 10:49 PM, Michael Hipp Michael@hipp.com wrote:

BTW, this series of questions prolly belongs on the py2exe list rather than here as it is not a wx issue per se. But I’m on both and tend to get them confused.

http://www.py2exe.org/

https://lists.sourceforge.net/lists/listinfo/py2exe-users

Michael

On 9/3/2010 9:28 PM, onpon4 wrote:

Wait… I’m confused. It seems to be making the assumption that I have

Visual Studio installed. Am I missing something?

On Fri, Sep 3, 2010 at 10:15 PM, Michael Hipp <Michael@hipp.com > > mailto:Michael@hipp.com> wrote:

On 9/3/2010 9:06 PM, onpon4 wrote:



    When I run my setup.py script to create an EXE for my wxPython

    app, I

    get an error saying I'm missing MSVCP90.dll. I know this is a

    problem

    with wxPython because my game made with Pygame freezes into an EXE

    perfectly. Any ideas what could be wrong? I'm on Windows Vista

    and using

    Python 2.6.





Start here:

[http://www.py2exe.org/index.cgi/Tutorial#Step5](http://www.py2exe.org/index.cgi/Tutorial#Step5)



That question gets asked by one of us about once a day on this list.



Michael

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

Hi,

···

On 04/09/2010 12:35, onpon4 wrote:

OK, but there's a problem: I did a search on my entire hard drive for MSVCR90.dll, and got no results. So... what now?

If you use Py 2.6 then you have it on your machine, otherwise Python wouldn't work. Depending on how you installed things it is either in:

- C:\Python26 (or wherever you installed Python 2.6)
or within winsxs folder
- C:\Windows\winsxs\x86_microsoft.vc80.crt"plus version information"

Werner

If you're using the newer versions of Windows (Vista / 7) I've never found a way to get search to actually search - it appears to be the perfect "nop" feature.

I use this instead when I need an actual hdd search tool:

Michael

···

On 9/4/2010 5:35 AM, onpon4 wrote:

OK, but there's a problem: I did a search on my entire hard drive for
MSVCR90.dll, and got no results. So... what now?

I looked in all of those, and I found a bunch of files called msvcr80.dll, but no msvcr90.dll. I actually found msvcr90.dll in a directory similar to what you mentioned, but with a 90 instead of an 80.
So anyways, now I have the DLL, so what now? That is, what do I need to add to setup.py? I’m really sorry, but I’m very confused by the instructions I’m seeing.

···

On Sat, Sep 4, 2010 at 9:08 AM, werner wbruhin@free.fr wrote:

Hi,

On 04/09/2010 12:35, onpon4 wrote:

OK, but there’s a problem: I did a search on my entire hard drive for MSVCR90.dll, and got no results. So… what now?

If you use Py 2.6 then you have it on your machine, otherwise Python wouldn’t work. Depending on how you installed things it is either in:

  • C:\Python26 (or wherever you installed Python 2.6)

or within winsxs folder

  • C:\Windows\winsxs\x86_microsoft.vc80.crt"plus version information"

Werner

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

I actually found msvcr90.dll in a directory similar to what you

> mentioned, but with a 90 instead of an 80.

I'm unable to parse that sentence. So did you find the files or not?

Here are the steps:
- Find the DLLs *and* the manifest file.
- Copy them somewhere convenient (near your project; so you can refer to them easily and they don't change on you).
- Add a 'data_files' option to your setup.py.

Michael

http://py2exe.org/index.cgi/GeneralTipsAndTricks
http://py2exe.org/index.cgi/ListOfOptions
http://www.py2exe.org/index.cgi/Tutorial#Step5

···

On 9/4/2010 9:22 AM, onpon4 wrote:

I looked in all of those, and I found a bunch of files called msvcr80.dll, but
no msvcr90.dll. I actually found msvcr90.dll in a directory similar to what you
mentioned, but with a 90 instead of an 80.

So anyways, now I have the DLL, so what now? That is, what do I need to add to
setup.py? I'm /really/ sorry, but I'm very confused by the instructions I'm seeing.

On Sat, Sep 4, 2010 at 9:08 AM, werner <wbruhin@free.fr > <mailto:wbruhin@free.fr>> wrote:

      Hi,

    On 04/09/2010 12:35, onpon4 wrote:

        OK, but there's a problem: I did a search on my entire hard drive for
        MSVCR90.dll, and got no results. So... what now?

    If you use Py 2.6 then you have it on your machine, otherwise Python
    wouldn't work. Depending on how you installed things it is either in:

    - C:\Python26 (or wherever you installed Python 2.6)
    or within winsxs folder
    - C:\Windows\winsxs\x86_microsoft.vc80.crt"plus version information"

    Werner

    --
    To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
    <mailto:wxPython-users%2Bunsubscribe@googlegroups.com>
    or visit http://groups.google.com/group/wxPython-users?hl=en

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

OK, well I’ve edited setup.py (see below; is that right?), but what’s the manifest file?

Sorry about the confusion, I did find it and copied it into the same directory as setup.py. I typed the first sentence before I found it in “C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91” (I had looked in “C:\Windows\winsxs\x86_microsoft.vc80.crt_*” directories).

Current setup.py script:

from distutils.core import setup
import py2exe
setup(console=[‘senso.py’, ‘senso_editor.py’],
data_files=[‘msvcr90.dll’])

···

On Sat, Sep 4, 2010 at 10:51 AM, Michael Hipp Michael@hipp.com wrote:

I actually found msvcr90.dll in a directory similar to what you

mentioned, but with a 90 instead of an 80.

I’m unable to parse that sentence. So did you find the files or not?

Here are the steps:

  • Find the DLLs and the manifest file.

  • Copy them somewhere convenient (near your project; so you can refer to them easily and they don’t change on you).

  • Add a ‘data_files’ option to your setup.py.

Michael

http://py2exe.org/index.cgi/GeneralTipsAndTricks

http://py2exe.org/index.cgi/ListOfOptions

http://www.py2exe.org/index.cgi/Tutorial#Step5

On 9/4/2010 9:22 AM, onpon4 wrote:

I looked in all of those, and I found a bunch of files called msvcr80.dll, but

no msvcr90.dll. I actually found msvcr90.dll in a directory similar to what you

mentioned, but with a 90 instead of an 80.

So anyways, now I have the DLL, so what now? That is, what do I need to add to

setup.py? I’m /really/ sorry, but I’m very confused by the instructions I’m seeing.

On Sat, Sep 4, 2010 at 9:08 AM, werner <wbruhin@free.fr > > mailto:wbruhin@free.fr> wrote:

  Hi,





On 04/09/2010 12:35, onpon4 wrote:



    OK, but there's a problem: I did a search on my entire hard drive for

    MSVCR90.dll, and got no results. So... what now?



If you use Py 2.6 then you have it on your machine, otherwise Python

wouldn't work.  Depending on how you installed things it is either in:



- C:\Python26 (or wherever you installed Python 2.6)

or within winsxs folder

- C:\Windows\winsxs\x86_microsoft.vc80.crt"plus version information"



Werner



--

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

mailto:wxPython-users%2Bunsubscribe@googlegroups.com

or visit [http://groups.google.com/group/wxPython-users?hl=en](http://groups.google.com/group/wxPython-users?hl=en)

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

The manifest file looks like this:

05/21/2010 04:26 PM 501 Microsoft.VC90.CRT.manifest

And contains this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
     <noInheritable/>
     <assemblyIdentity
         type="win32"
         name="Microsoft.VC90.CRT"
         version="9.0.21022.8"
         processorArchitecture="x86"
         publicKeyToken="1fc8b3b9a1e18e3b"
     />
     <file name="msvcr90.dll" />
     <file name="msvcp90.dll" />
</assembly>

It should have been located in the same dir as the DLL.

That data_files spec doesn't look right to me. It must be a *list* of *tuples*. The first item in the tuple is where to store the data file (just put '' to store it in the root of the dist folder). The second item in the tuple is a *list* of the data files or a glob to grab a group of them. Here's a snippet of mine:

     data_files = [
         ('', glob(r'c:\dev\resources\ms-vc-runtime\*.*')),
         ('', [r'c:\bin\robocopy.exe',]),
     ]

More here:
http://py2exe.org/index.cgi/data_files

Michael

···

On 9/4/2010 4:34 PM, onpon4 wrote:

OK, well I've edited setup.py (see below; is that right?), but what's
the manifest file?

Sorry about the confusion, I did find it and copied it into the same
directory as setup.py. I typed the first sentence before I found it in
"C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91"
(I had looked in "C:\Windows\winsxs\x86_microsoft.vc80.crt_*" directories).

Current setup.py script:

from distutils.core import setup
import py2exe
setup(console=['senso.py', 'senso_editor.py'], \
       data_files=['msvcr90.dll'])

Well… all there is is the 3 DLL files. No other files are there.

···

On Sat, Sep 4, 2010 at 7:11 PM, Michael Hipp Michael@hipp.com wrote:

The manifest file looks like this:

05/21/2010 04:26 PM 501 Microsoft.VC90.CRT.manifest

And contains this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<noInheritable/>

<assemblyIdentity

    type="win32"

    name="Microsoft.VC90.CRT"

    version="9.0.21022.8"

    processorArchitecture="x86"

    publicKeyToken="1fc8b3b9a1e18e3b"

/>

<file name="msvcr90.dll" />

<file name="msvcp90.dll" />

It should have been located in the same dir as the DLL.

That data_files spec doesn’t look right to me. It must be a list of tuples. The first item in the tuple is where to store the data file (just put ‘’ to store it in the root of the dist folder). The second item in the tuple is a list of the data files or a glob to grab a group of them. Here’s a snippet of mine:

data_files = [

    ('', glob(r'c:\dev\resources\ms-vc-runtime\*.*')),

(‘’, [r’c:\bin\robocopy.exe’,]),

]

More here:

http://py2exe.org/index.cgi/data_files

Michael

On 9/4/2010 4:34 PM, onpon4 wrote:

OK, well I’ve edited setup.py (see below; is that right?), but what’s

the manifest file?

Sorry about the confusion, I did find it and copied it into the same

directory as setup.py. I typed the first sentence before I found it in

“C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91”

(I had looked in “C:\Windows\winsxs\x86_microsoft.vc80.crt_*” directories).

Current setup.py script:

from distutils.core import setup

import py2exe

setup(console=[‘senso.py’, ‘senso_editor.py’], \

   data_files=['msvcr90.dll'])

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

Oops, that should have been:
c:\Windows\winsxs\x86_microsoft.vc90.crt"plus version information"

Werner

···

On 04/09/2010 15:08, werner wrote:

Hi,

On 04/09/2010 12:35, onpon4 wrote:

OK, but there's a problem: I did a search on my entire hard drive for MSVCR90.dll, and got no results. So... what now?

If you use Py 2.6 then you have it on your machine, otherwise Python wouldn't work. Depending on how you installed things it is either in:

- C:\Python26 (or wherever you installed Python 2.6)
or within winsxs folder
- c:\Windows\winsxs\x86_microsoft.vc80.crt"plus version information"

Some have found that with Py 2.6 the manifest file should be a "combined" one, i.e. contain the information for the VC90 stuff and the common controls (even so this should be dynamically loaded by wxPython as of 2.8.x) otherwise on some machines the theme used is the old XP one instead of the more modern stuff (i.e. rounded buttons etc).

I never run into the problem but the testing I did with the combined one shown on the wiki (py2exe-python26 - wxPyWiki ) worked for me on Win 7 and Win XP.

For the OP I would recommend to just use the sample setup.py's shown on the above wiki page. Adapt it to your application script, i.e. change the script name from 'simplewx' to whatever and adapt the folder used on the line starting with py26MSdll.

The format/structure of that setup.py is different to the one shown on the py2exe site as it is adapted to use with wxPython and it is originally generated with gui2exe (Google Code Archive - Long-term storage for Google Code Project Hosting.). Using gui2exe might be helpful to for the OP as it provides quit a bit of help/explanations on the different py2exe options etc.

Just my 0.02�
Werner

···

On 05/09/2010 01:11, Michael Hipp wrote:

The manifest file looks like this:

05/21/2010 04:26 PM 501 Microsoft.VC90.CRT.manifest

And contains this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<noInheritable/>
<assemblyIdentity
type="win32"
name="Microsoft.VC90.CRT"
version="9.0.21022.8"
processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"
/>
<file name="msvcr90.dll" />
<file name="msvcp90.dll" />
</assembly>

It should have been located in the same dir as the DLL.

This doesn’t make any sense. It seemed to work, but then I tried to open one of the EXEs, and got this error (outputted to a text file):

Traceback (most recent call last):
File “senso.py”, line 640, in
EOFError: EOF when reading a line

This only happened with senso.py, which is a game and doesn’t use wxPython, so I think I can work around this problem by creating senso.exe and senso_editor.exe separately, which I will try, but does someone get this? In the original Python script, line 640 is in the middle of the script, this line:

entry = raw_input().strip()

I can’t see why this would look like the end of a file.

To clarify, the main problem is fixed, but that new setup.py script doesn’t seem to work with my other script (which is a game and doesn’t use wxPython, but uses Pygame), which forces me to create that EXE separately, something I was trying to avoid by using Python 2.6 instead of Python 2.7 for wxPython and Python 3.1 for Pygame.

···

On Sun, Sep 5, 2010 at 6:06 AM, werner wbruhin@free.fr wrote:

On 05/09/2010 01:11, Michael Hipp wrote:

The manifest file looks like this:

05/21/2010 04:26 PM 501 Microsoft.VC90.CRT.manifest

And contains this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<assemblyIdentity

type=“win32”

name=“Microsoft.VC90.CRT”

version=“9.0.21022.8”

processorArchitecture=“x86”

publicKeyToken=“1fc8b3b9a1e18e3b”

/>

It should have been located in the same dir as the DLL.

Some have found that with Py 2.6 the manifest file should be a “combined” one, i.e. contain the information for the VC90 stuff and the common controls (even so this should be dynamically loaded by wxPython as of 2.8.x) otherwise on some machines the theme used is the old XP one instead of the more modern stuff (i.e. rounded buttons etc).

I never run into the problem but the testing I did with the combined one shown on the wiki (http://wiki.wxpython.org/py2exe-python26 ) worked for me on Win 7 and Win XP.

For the OP I would recommend to just use the sample setup.py’s shown on the above wiki page. Adapt it to your application script, i.e. change the script name from ‘simplewx’ to whatever and adapt the folder used on the line starting with py26MSdll.

The format/structure of that setup.py is different to the one shown on the py2exe site as it is adapted to use with wxPython and it is originally generated with gui2exe (http://code.google.com/p/gui2exe/). Using gui2exe might be helpful to for the OP as it provides quit a bit of help/explanations on the different py2exe options etc.

Just my 0.02€

Werner

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

Hi,

Can you please bottom post, top posting is really tuff to follow.

This doesn't make any sense. It seemed to work, but then I tried to open one of the EXEs, and got this error (outputted to a text file):

Traceback (most recent call last):
  File "senso.py", line 640, in <module>
EOFError: EOF when reading a line

This only happened with senso.py, which is a game and doesn't use wxPython, so I think I can work around this problem by creating senso.exe and senso_editor.exe separately, which I will try, but does someone get this? In the original Python script, line 640 is in the middle of the script, this line:

entry = raw_input().strip()

I believe this can only be run from a Python console.

So, I would suggest you create two targets.

I.e. add this:

GUI2Exe_Target_2 = Target(
     # what to build
     script = "scriptwithraw_input.py",
     icon_resources = icon_resources,
     bitmap_resources = bitmap_resources,
     other_resources = other_resources,
     dest_base = "swithraw",
     version = "0.1",
     company_name = "No Company",
     copyright = "No Copyrights",
     name = "Py2Exe Sample File"
     )

And change:

     console = ,
     windows = [GUI2Exe_Target_1]

to:

     console = [GUI2Exe_Target_2],
     windows = [GUI2Exe_Target_1]

Hope this helps
Werner

···

On 05/09/2010 13:09, onpon4 wrote:

Thanks, the problem was that I added to the windows list instead of the console list. Everything is perfect now.

···

On Sun, Sep 5, 2010 at 8:27 AM, werner wbruhin@free.fr wrote:

Hi,

Can you please bottom post, top posting is really tuff to follow.

On 05/09/2010 13:09, onpon4 wrote:

This doesn’t make any sense. It seemed to work, but then I tried to open one of the EXEs, and got this error (outputted to a text file):

Traceback (most recent call last):

File “senso.py”, line 640, in

EOFError: EOF when reading a line

This only happened with senso.py, which is a game and doesn’t use wxPython, so I think I can work around this problem by creating senso.exe and senso_editor.exe separately, which I will try, but does someone get this? In the original Python script, line 640 is in the middle of the script, this line:

entry = raw_input().strip()

I believe this can only be run from a Python console.

So, I would suggest you create two targets.

I.e. add this:

GUI2Exe_Target_2 = Target(

# what to build

script  =  "scriptwithraw_input.py",

icon_resources  =  icon_resources,

bitmap_resources  =  bitmap_resources,

other_resources  =  other_resources,

dest_base  =  "swithraw",

version  =  "0.1",

company_name  =  "No Company",

copyright  =  "No Copyrights",

name  =  "Py2Exe Sample File"

)

And change:

console  =  [],

windows  =  [GUI2Exe_Target_1]

to:

console  =  [GUI2Exe_Target_2],

windows  =  [GUI2Exe_Target_1]

Hope this helps

Werner

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

filefind.py (745 Bytes)