Py2Exe Problem - warning: strop functions are obsolete; use string methods

Steve Greiner steve_greiner at
Fri Aug 2 03:46:00 CEST 2002

I can't figure out something (I admit, I'm a little dense) that
doesn't seem to be a problem for anyone else, so I'm assuming I'm
doing something wrong.  I'm hoping someone will be kind enough to
point me to the obvious.

I'm trying to make a stand-alone executable, which seems build just
fine.  But, when I run it, I get a constant stream of:

warning: strop functions are obsolete; use string methods
warning: strop functions are obsolete; use string methods
warning: strop functions are obsolete; use string methods

until I hit <Ctrl>-<Break>.  So, I tried a (very) small sample program
that also fails whenever I import other modules.  If I comment out the
import sys line, it runs fine.  Here's to code and output:
import sys

if __name__ == '__main__':
    print "Hello"
    raw_input('Press <Enter> to continue...')

# end of


from distutils.core import setup
import py2exe
setup(name = 'hello', version = '0.0.1', scripts =

# end of

Output from: python py2exe
>>> running py2exe
running build
running build_scripts
copying c:\python22\slgwork\ -> build\scripts-2.2
running install_scripts
creating build\bdist.win32\winexe
creating build\bdist.win32\winexe\lib
creating build\bdist.win32\winexe\lib\PYTHON22
creating build\bdist.win32\winexe\lib\PYTHON22\Scripts
copying build\scripts-2.2\ ->
copying build\scripts-2.2\ ->
| Processing script c:\python22\slgwork\ with py2exe-0.3.3
creating build\bdist.win32\winexe\collect
creating build\bdist.win32\winexe\collect\hello
creating build\bdist.win32\winexe\collect\hello\Scripts.py2exe
Searching modules needed to run 'c:\python22\slgwork\' on
'', 'C:\\Python22\\Lib\\site-packages', 'C:\\PYTHON22\\SLGWORK',
'C:\\PYTHON22\\SLGLIB', 'C:\\PYTHON22\\lib\\site-packages\\win32',
'C:\\PYTHON22\\DLLs', 'C:\\PYTHON22\\lib',
'C:\\PYTHON22\\lib\\lib-tk', 'C:\\PYTHON22', 'C:\\Python22\\slgwork']
force_imports = 
Resolving binary dependencies:
ext_mapping = {
copying py2exe\ ->
byte-compiling c:\python22\lib\site-packages\py2exe\tools\
to imputil.pyc
copying c:\python22\slgwork\ ->
changing into 'build\bdist.win32\winexe\collect\hello'
zip -rq C:\Python22\Lib\site-packages\build\bdist.win32\winexe\
creating 'C:\Python22\Lib\site-packages\build\bdist.win32\winexe\'
and adding '.' to it
changing back to 'C:\Python22\Lib\site-packages'
creating dist\hello\hello.exe
warning: py2exe: BeginUpdateResource: This function is only valid in
Win32 mode.

  No VersionInfo will be created
not copying C:\WINDOWS\SYSTEM\python22.dll (output up-to-date)
removing 'build\bdist.win32\winexe\collect\hello' (and everything
under it)
Built File dist\hello\hello.exe
removing 'build\bdist.win32\winexe' (and everything under it)

I've grabbed the latest version of Python and Py2Exe this week, but
perhaps I've got my configuration screwed up, nonetheless.

Thanks for any help.

More information about the Python-list mailing list