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

Steve Greiner steve_greiner at pobox.com
Thu Aug 1 21:46:00 EDT 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:

#hello.py
import sys

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

# end of hello.py

# setup.py

from distutils.core import setup
import py2exe
setup(name = 'hello', version = '0.0.1', scripts =
['c:\\python22\\slgwork\\hello.py'])

# end of setup.py

Output from: python setup.py py2exe
>>> running py2exe
running build
running build_scripts
copying c:\python22\slgwork\hello.py -> 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\ftpcopy.py ->
build\bdist.win32\winexe\lib\PYTHON22\Scripts
copying build\scripts-2.2\hello.py ->
build\bdist.win32\winexe\lib\PYTHON22\Scripts
+----------------------------------------------------
| Processing script c:\python22\slgwork\hello.py 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\hello.py' on
path:
['C:\\Python22\\Lib\\site-packages\\build\\bdist.win32\\winexe\\lib\\PYTHON22\\Lib\\site-packages',
'', 'C:\\Python22\\Lib\\site-packages', 'C:\\PYTHON22\\SLGWORK',
'C:\\PYTHON22\\SLGLIB', 'C:\\PYTHON22\\lib\\site-packages\\win32',
'C:\\PYTHON22\\lib\\site-packages\\win32\\lib',
'C:\\PYTHON22\\lib\\site-packages\\Pythonwin',
'c:\\python22\\lib\\site-packages\\py2exe',
'c:\\python22\\lib\\site-packages\\py2exe\\tools',
'C:\\PYTHON22\\DLLs', 'C:\\PYTHON22\\lib',
'C:\\PYTHON22\\lib\\lib-tk', 'C:\\PYTHON22', 'C:\\Python22\\slgwork']
force_imports = 
Resolving binary dependencies:
  py2exe\run.exe
  C:\WINDOWS\SYSTEM\python22.dll
ext_mapping = {
}
copying py2exe\support.py ->
build\bdist.win32\winexe\collect\hello\Scripts.py2exe
byte-compiling c:\python22\lib\site-packages\py2exe\tools\imputil.py
to imputil.pyc
copying c:\python22\slgwork\hello.py ->
build\bdist.win32\winexe\collect\hello\Scripts.py2exe\__main__.py
changing into 'build\bdist.win32\winexe\collect\hello'
zip -rq C:\Python22\Lib\site-packages\build\bdist.win32\winexe\hello.zip
.
creating 'C:\Python22\Lib\site-packages\build\bdist.win32\winexe\hello.zip'
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