[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame/__init__.py error on Mac OS X 10.4




On Jun 13, 2005, at 3:46 AM, Todd Mortimer wrote:

I am trying to install from source here using Darwinports, but I took a look at the package pygame-1.7.0-py2.4-macosx10.3.zip from pythonmac.org (there doesn't appear to be a 10.4 package yet), and I believe it has the same problem.

Generally software built for 10.3 works on 10.4, and the stuff in pythonmac packages is no exception. Packages that are listed in the 10.4 section are built with 10.4 specific features.


From the pythonmac package, the file macosx.py in the pygame_platlib_1.7.0.pkg package contains similar lines:

"""
# about line 140
# running inside a bundle, change dir
if (os.getcwd() == '/') and len(sys.argv) > 1:
os.chdir(os.path.basedir(sys.argv[0])) # basedir method does not exist in os.path module
"""


Is the call to os.path.basedir() supposed to be there?

No, surprising that nobody has bothered to report it until now. I had figured it simply wasn't there in 1.7. Probably because py2app changes the directory away from / before pygame.init is called, and hardly anyone ever runs scripts from /. Are you using bundlebuilder or something? If so, don't.


In any case, it should be fixed in CVS.

-bob