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?
Thanks in advance
Werner 4 3595
Werner Merkl <werner_DOT_mer kl_@_fujitsu_DA SH_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_dynami c (custom loaders
are created for them, in py2exe\build_ex e.py, the create_loader method).
As far as I can see, imp.load_dynami c(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
Thomas Heller wrote: Werner Merkl <werner_DOT_mer kl_@_fujitsu_DA SH_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_dynami c (custom loaders are created for them, in py2exe\build_ex e.py, the create_loader method). As far as I can see, imp.load_dynami c(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
Hi,
I recompiled my application as a console program and got following error
message:
-----------------------------------------------------------------------
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\>e:\AUTORUN. EXE
Traceback (most recent call last):
File "D:\PROGS\Pytho n23\lib\site-packages\py2exe \boot_common.py ",
line 69, in ?
import linecache
zipimport.ZipIm portError: can't decompress data; zlib not available
Traceback (most recent call last):
File "AutoRun.py ", line 54, in ?
zipimport.ZipIm portError: can't decompress data; zlib not available
-----------------------------------------------------------------------
so I removed "compressed ": 1, from setup.py and it WORKS!!!
This seems to be a bug in py2exe ????
Thanks a lot
Werner
-----------------------------------------------------------------------
---------------------- part of setup.py ------------------------------
[...]
setup(
options = {"py2exe": {# create a compressed zip archive
"compressed ": 1,
"optimize": 2,
"packages": ["encodings"],
"excludes": excludes}},
# The lib directory contains everything except the executables and
# the python dll.
# Can include a subdirectory name.
zipfile = "lib/shared.zip",
data_files = [('bin',glob.glo b("bin/*")),
('.',['AUTORUN.INF',' ReadMe.txt'])],
## windows = [AutoRun],
console = [AutoRun],
)
Werner Merkl <werner_DOT_mer kl_@_fujitsu_DA SH_siemens.com> writes: Hi,
I recompiled my application as a console program and got following error message:
----------------------------------------------------------------------- Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.
C:\>e:\AUTORUN. EXE Traceback (most recent call last): File "D:\PROGS\Pytho n23\lib\site-packages\py2exe \boot_common.py ", line 69, in ? import linecache zipimport.ZipIm portError: can't decompress data; zlib not available Traceback (most recent call last): File "AutoRun.py ", line 54, in ? zipimport.ZipIm portError: can't decompress data; zlib not available -----------------------------------------------------------------------
so I removed "compressed ": 1, from setup.py and it WORKS!!!
Great!
This seems to be a bug in py2exe ????
The zlib module is the only one that is imported with the standard
mechanism, since it is imported when a zipfile is added to sys.path.
So, when it's filename has the wrong case the import will fail, and the
only solution would be to set PYTHONCASEOK=1 before. Unfortunately,
this cannot be done somewhere in your Pythoncode, because it's too late
then. So, if you insist on 'compressed': 1 (but why would you?) the
only solution that I see is to add
_putenv("PYTHON CASEOK=1");
to the source file start.c, somewhere in the init_with_insta nce
function, near line 135, and rebuild py2exe.
Thomas
Thomas Heller wrote: Werner Merkl <werner_DOT_mer kl_@_fujitsu_DA SH_siemens.com> writes:
Hi,
I recompiled my application as a console program and got following error message:
----------------------------------------------------------------------- Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.
C:\>e:\AUTORU N.EXE Traceback (most recent call last): File "D:\PROGS\Pytho n23\lib\site-packages\py2exe \boot_common.py ", line 69, in ? import linecache zipimport.Zip ImportError: can't decompress data; zlib not available Traceback (most recent call last): File "AutoRun.py ", line 54, in ? zipimport.Zip ImportError: can't decompress data; zlib not available -----------------------------------------------------------------------
so I removed "compressed ": 1, from setup.py and it WORKS!!!
Great!
This seems to be a bug in py2exe ????
The zlib module is the only one that is imported with the standard mechanism, since it is imported when a zipfile is added to sys.path. So, when it's filename has the wrong case the import will fail, and the only solution would be to set PYTHONCASEOK=1 before. Unfortunately, this cannot be done somewhere in your Pythoncode, because it's too late then. So, if you insist on 'compressed': 1 (but why would you?) the only solution that I see is to add _putenv("PYTHON CASEOK=1"); to the source file start.c, somewhere in the init_with_insta nce function, near line 135, and rebuild py2exe.
Thomas
Thank you very much for you explanation. I think, I will not use
compressed in future (normally there is enough space on a DVD or
even on a CD ;-).
regards
Werner This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: RJS |
last post by:
Hi all,
I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32-
py2.2).
Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222.
In the sample below, commenting out "import numarray" allows the exe to
run. Left in, I get "4.exe has generated errors" etc.
I'm going around and around and there isn't much on Google.
py2exe output is last.
|
by: Stefan Behrens |
last post by:
Hi,
does anybody know how I can get py2exe to work with wxPython's
wxCalendarCtrl?
Currently, I have just a "standard" setup.py, and py2exe gives me a
syntax error.
Do I need to include any special extension and how?
Below is the output I get as well as a small demo app to reproduce the
problem.
|
by: Kathleen Kudzma |
last post by:
I'm having a problem with py2exe for Python 2.3. I got fixed the
Lookuperror no codec search functions registered: can't find encoding by
following the instructions on the py2exe page (added -packages encodings
--force-imports encodings). This resolved the codec error. When I tried to
create an exe with py2exe I still got the following warnings. Please see
the new error I got (after warnings).
...
|
by: Kathleen Kudzma |
last post by:
Does anyone know how to resolve the following problem that I'm getting in
Python 2.2 and 2.3?
PROBLEM: When I try to create a classReader object I get an exception:
"SAXReaderNotAvailable: No parsers found". This only happens when I run the
..EXE; it does not happen if I run the .PY file. When I'm running the .EXE
this exception doesn't happen immediately. It happens as soon as I try to
create a classReader object.
Please see the...
|
by: Steven Bell |
last post by:
I am trying to build an executable from a python script.
Using python 2.3, SOAPpy 0.10.3, Py2exe 0.4.2.
Build command: python setup.py py2exe -w --includes
xml.sax.drivers2.drv_py
I get the following output:
warning: py2exe: *************************************************************************
warning: py2exe: * The following modules were not found:
warning: py2exe: * Carbon.Folder
| |
by: Luc Saffre |
last post by:
Hello,
I had a strange problem when freezing (using either py2exe or McMillan
installer) a script that imports reportlab (which imports PIL (which
imports FixTk))).
- Python 2.3.3c (also with Python 2.3)
- PIL 1.1.4
- Installer or py2exe : latest versions.
|
by: ex laguna |
last post by:
Hi, I have ran into a problem with py2exe 0.5.0 and shelve in python
2.3.3. The script works fine standalone, but not with py2exe.
Does anyone have a solution of workaround for this? Thanks much.
# Begin of setup.py
from distutils.core import setup
import py2exe
setup(console=)
|
by: Tim Axtelle |
last post by:
I am new to Python and am trying to create a standalone exe from a
python script using py2exe 0.5.0 and Python 2.3 without success. I am
able to generate the appropriate .exe file but it is not executable.
Running it does absolutely nothing.
The sourceforge site says that wsvc6 is required for py2exe. Is this
true? If so, it is contradiction with the python faq which claims
that no C compiler is necessary with py2exe.
I also tried...
|
by: PipedreamerGrey |
last post by:
I've been banging my head against this problem for a week. It's time
to ask for help, because I'm obviously not going to solve this by trial
and error. I'm trying to create a standalone version (.exe) of
PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I
attempt to compile the program, I get an error during compilation. I
need to formulate the correct setup file. Here's the one I began with:
from distutils.core...
|
by: luke14free |
last post by:
Hello,
I'm working on a project and I need to compile it to run it on win as an exe.
I choose pyinstaller to build my exe but after several tries my result is always the same, from my console (win2k - py2.5/2.4) I type:
c:\>cd pyinstaller-1.3
c:\pyinstaller-1.3>Makespec -w --noconsole ..\\fatture\\fatture.py
project compiled...now run Build to build (more or less)
c:\pyinstaller-1.3>Build fatture\\fatture.spec
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |