[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Py2EXE Error Involving raw_input



Patrick Mullen wrote:

On 10/13/07, *kschnee@xxxxxxxxxx <mailto:kschnee@xxxxxxxxxx>* <kschnee@xxxxxxxxxx <mailto:kschnee@xxxxxxxxxx>> wrote:
    In other words the raw_input command is doing something odd in EXE form,
    even before the program is able to display the prompt or accept
    input. Any
    idea what's going on, or why this error would only appear in the
    EXE? This
    is a very simple program with no special modules but Pygame.


My guess is that you used py2exe with the "windows" argument, meaning that no console is opened - without a console there is no stdin for raw_input to use. You can instead use the "console" argument in your setup.py, and your exe will open a console window allowing raw_input to work.

That was it exactly; thanks!

You can download the EXE with source and a few example images and "masks" at <http://kschnee.xepher.net/code/tile_maker.zip>. It's not much to look at and even now I'm finding that rotated versions of these tiles don't quite match, but hopefully someone will get some use from it.

Looking at how the tiles turn out, the program has me imagining procedurally generating the transition tiles at run-time, so that the only landscape graphics are the raw terrain textures. Might be interesting to try.