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

Re: [pygame] Python 3, scrap, and the Mac



Hi David,

Apparently I did not port scrap to Python 3.x on Windows. I remember one of the ports would be more difficult than the others: some function returned the raw buffer of a Python string, and would not work as is for a unicode object.

Lenard Lindstrom

On 17/03/12 12:30 AM, David Burton wrote:
Hi Lenard,

Did your scrap module ever get merged into Python 3?

Pydoc fails on pygame 1.9.2pre using Python 3.2.1 (32-bit) on Windows 7:

    NotImplementedError: scrap module not available (ImportError: No
    module named scrap)


    server> c:\python32\Lib\inspect.py:103: RuntimeWarning: use scrap:
    No module named scrap
    (ImportError: No module named scrap)
      return (hasattr(object, "__get__")

[I'm using your new (29 day old, 4.0 MB) https://bitbucket.org/pygame/pygame/downloads/pygame-1.9.2a0.win32-py3.2.msi installed on top of the standard (6.4 MB) http://pygame.org/ftp/pygame-1.9.2a0.win32-py3.2.msi ]

To get pydoc to work with pygame I added a try/except to \Python32\Lib\inspect.py -- here's the diff:
http://www.burtonsys.com/python32/inspect.diff

With that patch, pydoc works with pygame, and reports just a few issues:
*scrap* = <pygame.MissingModule object>
*sndarray* = <pygame.MissingModule object>
*surfarray* = <pygame.MissingModule object>

Dave



On *Mon, Feb 28, 2011* at 7:58 PM, Lenard Lindstrom <len-l@xxxxxxxxx <mailto:len-l@xxxxxxxxx>> wrote:

    Hi everyone,

    I started a Pygame branch, port_scrap_py3, to update the scrap
    module for Python 3.x. So far I have ported it for Linux and
    Windows. Would someone try it on OS X? It looks like no changes
    are necessary, but it needs testing before merging back into trunk.

    Thanks,

    Lenard Lindstrom