Instructions on how to build py2exe 0.6.8 (or an installer would be nice, too!)

2008-06-10 Thread chardish
Hello,

I'm trying to build an executable with py2exe, but unfortunately the
version I have is 0.6.6, which has a rather annoying bug that doesn't
let you rename the executable file if you bundle everything in a
single executable. It seems fairly unacceptable to tell our customers
that they can't rename a file we send them.

I hear this problem is fixed in 0.6.8, but unfortunately there's no
standalone installer for py2exe 0.6.8 - the most recent version that
has an installer is 0.6.6 way back from 2006 (!). Is there a
standalone installer for py2exe 0.6.8 anywhere? If not, how do I build
it from source? (There's no instructions in the readme - it just says
"How to install: download the standalone installer" and doesn't
include building instructions.)

Cheers,
Evan
--
http://mail.python.org/mailman/listinfo/python-list


Re: Instructions on how to build py2exe 0.6.8 (or an installer would be nice, too!)

2008-06-10 Thread chardish
On Jun 10, 11:07 am, Thomas Heller <[EMAIL PROTECTED]> wrote:
> You need the same compiler that was used to build the
> Python that you use.

Thanks for the tip. So if I downloaded a binary Python instead of
building it from sources, I'm out of luck?
--
http://mail.python.org/mailman/listinfo/python-list


Re: Instructions on how to build py2exe 0.6.8 (or an installer would be nice, too!)

2008-06-10 Thread chardish
On Jun 10, 11:34 am, Mike Driscoll <[EMAIL PROTECTED]> wrote:
> Maybe I'm missing something, but I can rename the executables I create
> using py2exe 0.6.6 to anything I want after they're created.
>
> Or are you talking about a Windows installer for the py2exe module
> itself? Where are you finding this 0.6.8 version anyway? I can't find
> it onwww.py2exe.org
>
> Anyway, what Thomas is talking about is that the only way to create a
> usable installer of py2exe on Windows is to use the same compiler that
> the Python you are using. As I understand it, Python 2.4 and 2.5 used
> Visual Studio 2003. I think 2.3 used VS6. I have both, so I can try to
> compile an installer for any of those versions if you can link me to
> the source.
>
> Mike
>
> Python Extension Building Network:     http:\\www.pythonlibrary.org

The issue with renaming executables only applies to single-file
executables, i.e. ones created with zipfile = None as an argument to
setup() and --bundle 1 as a command line argument. This is a known
issue as of 0.6.6: http://py2exe.org/index.cgi/ProblemsToBeFixed

I found sources for 0.6.8 on CVS at: http://sourceforge.net/cvs/?group_id=15583

A Windows installer for the 0.6.8 py2exe module would be ideal, but
somehow I doubt that's going to happen anytime soon since there hasn't
been a new installer since 2006. If you are willing to build that for
me (since I don't have VS) I'd really appreciate it : ) I'm using 32-
bit WinXP on this computer.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Instructions on how to build py2exe 0.6.8 (or an installer would be nice, too!)

2008-06-10 Thread chardish
On Jun 10, 1:11 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote:
> On Jun 10, 10:47 am, [EMAIL PROTECTED] wrote:
>
>
>
> > On Jun 10, 11:34 am, Mike Driscoll <[EMAIL PROTECTED]> wrote:
>
> > > Maybe I'm missing something, but I can rename the executables I create
> > > using py2exe 0.6.6 to anything I want after they're created.
>
> > > Or are you talking about a Windows installer for the py2exe module
> > > itself? Where are you finding this 0.6.8 version anyway? I can't find
> > > it onwww.py2exe.org
>
> > > Anyway, what Thomas is talking about is that the only way to create a
> > > usable installer of py2exe on Windows is to use the same compiler that
> > > the Python you are using. As I understand it, Python 2.4 and 2.5 used
> > > Visual Studio 2003. I think 2.3 used VS6. I have both, so I can try to
> > > compile an installer for any of those versions if you can link me to
> > > the source.
>
> > > Mike
>
> > > Python Extension Building Network:     http:\\www.pythonlibrary.org
>
> > The issue with renaming executables only applies to single-file
> > executables, i.e. ones created with zipfile = None as an argument to
> > setup() and --bundle 1 as a command line argument. This is a known
> > issue as of 0.6.6:http://py2exe.org/index.cgi/ProblemsToBeFixed
>
> I'm using GUI2Exe to wrap my 0.6.6 version of py2exe. I use the bundle
> into a single file option in it and have zipfile=None too. But maybe
> one of my other switches is different.
>
>
>
> > I found sources for 0.6.8 on CVS 
> > at:http://sourceforge.net/cvs/?group_id=15583
>
> > A Windows installer for the 0.6.8 py2exe module would be ideal, but
> > somehow I doubt that's going to happen anytime soon since there hasn't
> > been a new installer since 2006. If you are willing to build that for
> > me (since I don't have VS) I'd really appreciate it : ) I'm using 32-
> > bit WinXP on this computer.
>
> I finally figured out how to check out the code. I'm at work now,
> where I only have VS2008 installed so I'll have to wait until I get
> home this evening to try compiling it. I'll let you know if I have any
> luck.
>
> -
> Mike
>
> Python Extension Building Network:     http:\\www.pythonlibrary.org

Thanks, Mike. Hopefully you'll have more luck than I've had : )

Evan
--
http://mail.python.org/mailman/listinfo/python-list


Re: Instructions on how to build py2exe 0.6.8 (or an installer would be nice, too!)

2008-06-11 Thread chardish
On Jun 10, 8:50 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote:
> Evan,
>
> 
>
>
>
> > > I finally figured out how to check out the code. I'm at work now,
> > > where I only have VS2008 installed so I'll have to wait until I get
> > > home this evening to try compiling it. I'll let you know if I have any
> > > luck.
>
> > > -
> > > Mike
>
> > > Python Extension Building Network:
>
> > Thanks, Mike. Hopefully you'll have more luck than I've had : )
>
> > Evan
>
> I got it compiled. They are up on my website:
>
> http://pythonlibrary.org/python_modules.htm
>
> I tested it on one of my simple programs and it ran. I used the 2.5
> version for that test. However, it should be noted that I haven't been
> able to get the tests from CVS to run. The Traceback doesn't appear to
> be py2exe related though. I'll post the issue to their group and see
> if they have any idea why that would be.
>
> In the meantime, feel free to give it a try. At worst you'll have to
> delete the compiled binary and the py2exe folder.
>
> Mike

Mike -

Thank you VERY much! py2exe installed fine and I now have a working
single-file executable that I can actually change the name of. Your
website looks useful in general; I'll store it away for the next time
I need to do Python programming on win32.

Larry - I'm of the philosophy that very simple tools (as opposed to
full applications) should not require installation, and if the tool is
so simple as to not even require saving configuration/preference files
(as mine is) it shouldn't even need its own directory. It should just
be a simple, convenient, portable executable. I like the OS X .app
file format (where the "application file" is merely a directory that
behaves differently by executing the main program when you double-
click it, instead of opening the directory) but it doesn't look like
that will be adapted on Windows anytime soon, so short of making
someone dump a bunch of inconvenient files someplace on their hard
drive, a single executable is the most prudent choice, IMHO.

Thanks, everyone, for your help!

Cheers,
Evan

--
http://mail.python.org/mailman/listinfo/python-list


"which python" as a python command?

2008-09-25 Thread chardish
Hello,

I'm trying to find out in a script where the location of the current
python is. (I'm writing an installer script in python for a simple
server application, so i'm going to do a find-replace in a bunch of
files to give them the absolute path of the python binary.

One thought might be to use the subprocess module, run "which python"
as a subprocess, and then peek at stdout, but that seems way too
complicated. Is there a simple solution for this in just a few lines
of code?

Cheers,
Evan
--
http://mail.python.org/mailman/listinfo/python-list


Re: "which python" as a python command?

2008-09-25 Thread chardish
On Sep 25, 11:14 am, Carsten Haese <[EMAIL PROTECTED]> wrote:
> import sys
> print sys.executable

This is exactly what I needed. Thanks!
--
http://mail.python.org/mailman/listinfo/python-list