Apoligies if this goes to the wrong place - I'm new to mailing lists. I've done a lot of digging and tinkering, and am posting what I've found in case it helps anybody else.
I started by py2exe'ing a script that was basically just: execfile("test.py") To see what did and did not work in test.py on a machine without python installed. test.py could be edited in notepad from any machine obviously. I didn't expect it to work, and it didn't - I was failing with imports, so I started sticking imports before the line execfile("test.py") which does work. I ended up writing a find all modules function and a 'deep import' function for packages. I built these into setup.py so that it would try to import any name it found, log the ones that worked, use that log to build a script to freeze, and ultimately freeze it. I can't help it, I have a thing for brute force. Along the way, I was reading anything I could find about how import actually works. I also was able to define what I'm wanting to accomplish a little better. As far as I can tell, what an installer does in the registry is A) Put python.exe in the search path B) Associate icons for .py and .pyc files, C) Setup .py and .pyc files up as executable, sent to python.exe to interperet, and D) setup the pythonpath environment variable to support import statements. A, B, and C are not a big deal for a developer, but they can confuse a user. D is a near necessity no matter who you are. My next plan is to copy an entire python installation (files and folders) onto a shared network drive, and write something to set up path and pythonpath environment variables. That way, any machine connected to that drive should run python programs without any installation. Making an app launchable via 'doubleclick' will require encapsulating the setup program and the app itself, but there are 1,001 ways to do that. I'll report back on how this goes. Thanks to everybody for their input. On 2/13/07, Wedge & Lever <[EMAIL PROTECTED]> wrote:
At work, bringing in an executable to use is no big deal, but installing anything takes an act of congress. Because of this, I was going to try to py2exe everything you get with the windows installer, wxPython, and pyOpenGL. My goal is basically a complete python distribution that does not need to install anything. Is this a pipe dream? If it's doable, I can figure it out... I just don't want to throw a lot of time and effort at the impossible. If anybody's tried this, or knows a good reason it should/couldn't work, I'd appreciate any feedback you can provide.
_______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32