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

Re: [pygame] PyGlyph: Making Examples Work



Kris Schnee wrote:
I'd like to be able to render text in OpenGL so that I can do an interface not limited to SDL rendering speeds, but so far I've not succeeded. PyGlyph seems like a solution, but its Hello World example crashes.

<code>
Traceback (most recent call last):
  File "C:\Python24\pyglyph\example\hello.py", line 56, in ?
    HelloExample().run()
  File "C:\Python24\pyglyph\example\example_base.py", line 60, in run
    self.init()
  File "C:\Python24\pyglyph\example\hello.py", line 30, in init
    fonts = pyglyph.font.LocalFontFactory(font_dir)
  File "C:\Python24\pyglyph\font.py", line 117, in __init__
    self.add(path)
  File "C:\Python24\pyglyph\font.py", line 130, in add
    self.add(os.path.join(path, file))
  File "C:\Python24\pyglyph\font.py", line 132, in add
    info = pyglyph.ttf.TruetypeInfo(path)
  File "C:\Python24\pyglyph\ttf.py", line 93, in __init__
    mmap.MAP_SHARED, mmap.PROT_READ)
AttributeError: 'module' object has no attribute 'MAP_SHARED'
</code>

The problem might be due to a bad installation, as I had to guess at where to put the files. Through some combination of trying to run setup.py (which just complained that I didn't give it any parameters) and simply moving files, I got PyGlyph's files into a subdirectory of Python24. I tried "import pyglyph" in the console, which worked. But then the "hello" and "paragraph" examples gave me this error.
It didn't work when you did
'python setup.py install'?
it required more arguments than that?
(Just thought I'd ask in case you didn't pass it 'install' :)