crossplatform py2exe - would it be useful?

O

Oren Tirosh

.
Sounds much like the way py2exe already works now. It locates the
appended zip-file by searching the exefile from the end, then finds the
beginning of the zipfile, and looks for a magic number there, which is
used to verify that the next n bytes before this position is a C
structure containing the required flags.

I don't like the idea to scan the executable for a magic signature
without further hints where this should be.

I wasn't suggesting scanning the executable at runtime. When py2exe
reads the python executablein order to create a copy with an appended
zip archive it might as well scan for a signature and modify the
customization area that follows it. When this customized interpreter
loads the customization values will already be in memory in the form of
an initialized variable.

If the interpreter detects that the customization area has been modified
it will interpret it as command-line arguments instead of argv. This
enables complete control of things like compiler flags, optimization
flag, ignoring environment, etc. A short "-c" string can be used for
bootstrapping the appended zip. The call to PySys_SetArgv would use the
real argv, if course.

Oren
 
M

Marc Wilson

In comp.lang.python, (e-mail address removed) (Bengt Richter) (Bengt Richter) wrote in
<[email protected]>::

|>For instance, I have written a couple of little progs in Python to solve
|>problems for a client. I need to make them into executables, because, while
|>he's willing to install an .exe I've written, he's less sure about one
|>written by someone who has no contract with him, and no comeback if it goes
|>taters.
|You make the contract. If you use open source, he'll come back to you, and you'll
|be able to fix it, or find someone here who can. Python itself is written
|"by someone who has no contract with him" (presumably). How do you square that?
|
|How does he feel about installing via something you've made with Installshield
|(commercial installer .exe packager)? He will certainly have no easy way to deal
|with any problem with that other than call you, and you will have no easy way
|to check on what happened, because you can't just look at the code, or ask someone
|here who knows about the code, because it isn't openly available (AFAIK; for a price
|most commercial things are possible).


Hey, I didn't say it was a rational position. :)
--
Marc Wilson

Cleopatra Consultants Limited - IT Consultants
2 The Grange, Cricklade Street, Old Town, Swindon SN1 3HG
Tel: (44/0) 70-500-15051 Fax: (44/0) 870 164-0054
Mail: (e-mail address removed) Web: http://www.cleopatra.co.uk
_________________________________________________________________
Try MailTraq at https://my.mailtraq.com/register.asp?code=cleopatra
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,218
Latest member
GracieDebo

Latest Threads

Top