NTLM authorization - compile into EXE

Thomas Heller theller at python.net
Thu Apr 4 12:03:46 EST 2002


"Marc Scheuner" <> wrote in message news:9b309481.0204031300.70ce3c63 at posting.google.com...
> Folks,
>
> I'm faced with the need to deal with an MS ISA proxy server. This
> proxy users NTLM Authorization, which basically no internet tool
> supports - except MS IE......
>
> I downloaded the Python 1.5.2 source from here:
> http://www.geocities.com/rozmanov/ntlm
>
> and I also downloaded Python 1.5.2 itself - everything works okay.
>
> But under Windows, having an extra command line window open just for
> this NTLM proxy thingie is a bit "annoying" - so I thought I'd compile
> it into an EXE, using Py2EXE. Downloaded all that stuff, too, and went
> through all the steps recommended (distutils stuff and the like) - but
> I still can't seem to compile that Python code into a Windows
> EXEcutable.
>
> The error message I get is very cryptic - at least to me as a Phyton
> newbie. Don't really know what it tries to tell me....
>
> ---------------
> File "C:\Program Files\Python\py2exe\resources\VersionInfo.py", line
> 56, in ?
>   raise ImportError, "Could not import StringTables, no unicode
> available"
> ImportError: Could not import StringTables, no unicode available
> ---------------

Marc,

looks like a bug in py2exe ;-)
This patch to py2exe\build_exe.py should fix the bug, can you try it?

Thanks,

Thomas

Index: build_exe.py
===================================================================
RCS file: /cvsroot/py2exe/py2exe/py2exe/build_exe.py,v
retrieving revision 1.4
diff -c -r1.4 build_exe.py
*** build_exe.py 20 Mar 2002 09:54:44 -0000 1.4
--- build_exe.py 4 Apr 2002 16:56:01 -0000
***************
*** 838,845 ****
          # "legalcopyright legaltrademarks originalfilename productname"
          # "productversion"

!         from resources.VersionInfo import VS_VERSIONINFO, RT_VERSION, \
!              StringFileInfo, VarFileInfo, VersionError
          from py2exe_util import add_resource

          md = self.distribution.metadata
--- 838,850 ----
          # "legalcopyright legaltrademarks originalfilename productname"
          # "productversion"

!         try:
!             from resources.VersionInfo import VS_VERSIONINFO, RT_VERSION, \
!                  StringFileInfo, VarFileInfo, VersionError
!         except ImportError, details:
!             self.warn("%s\n  No VersionInfo will be created" % details)
!             return delete
!
          from py2exe_util import add_resource

          md = self.distribution.metadata






More information about the Python-list mailing list