py2exe and CD-ROM ISO Level 1

Thomas Heller theller at python.net
Thu Oct 28 09:32:32 EDT 2004


Werner Merkl <werner_DOT_merkl_ at _fujitsu_DASH_siemens.com> writes:

> Hi,
>
>
> [still looking for a solution]
>
> we have written a Python EXE program, which should run via AUTORUN.INF
> from a CD/DVD (Windows of course).
>
> For this CD/DVD we us a imaging tool from Microsoft, which seam to
> generate a pure ISO 9660 level 1 image.
>
> This means:
>   - Only upper case letters A-Z and numbers 0-9
>   - 8.3 file names
>
> For Python 2.2 and py2exe 0.4.1 this worked fine. Today, it does not.
>
> So:
>   - Is there an option to generate a py2exe program with PYTHONCASE set?
>   - Or do I need a wrapper? (My own C program, setting the environment
>              and then starting the Python EXE program.)
>   - Is there a tricky way to start up with code like
>        "import OS as os"?
>   - May I use my own case insensitive importer?
>   - Or do I need to recompile Python?

What errors exactly do you get?

Although I have posted before that this wouldn't work, currently I
believe that it *should* work.
I tried the 'simple' sample in the py2exe distro, which contains a
trvivial command line program, plus a simple wxPython program, wrote
them to an ISO level 1 CD, and it worked.

1. The python modules are imported from the zip file, as long as this
has an 8.3 name, all should be fine.

2. Extension modules are loaded with imp.load_dynamic (custom loaders
are created for them, in py2exe\build_exe.py, the create_loader method).
As far as I can see, imp.load_dynamic(module_name, file_name) should
work independent of the case or spelling of 'file_name'.  If the
extensions you need have filenames with more than 8 characters, you
could probably subclass the build_exe command.

Thomas



More information about the Python-list mailing list