1

Trying to run a basic example Pyprocessing script found here in Python 2.7, I get the following error message. Any idea whats causing it?

Traceback (most recent call last):
  File "C:\Users\erez\Documents\Robin\scripts\Python\networkx-eg1.py", line 10, in <module>
    run()
  File "C:\Python27\lib\site-packages\pyprocessing-0.1.2.7-py2.7.egg\pyprocessing\__init__.py", line 383, in run
    pyglet.app.run()
  File "C:\Python27\lib\site-packages\pyglet\app\__init__.py", line 123, in run
    event_loop.run()
  File "C:\Python27\lib\site-packages\pyglet\app\base.py", line 135, in run
    self._run_estimated()
  File "C:\Python27\lib\site-packages\pyglet\app\base.py", line 164, in _run_estimated
    timeout = self.idle()
  File "C:\Python27\lib\site-packages\pyglet\app\base.py", line 280, in idle
    window.flip()
  File "C:\Python27\lib\site-packages\pyprocessing-0.1.2.7-py2.7.egg\pyprocessing\flippolicy.py", line 149, in flip
    currentpos = (c_int*2)(0)
NameError: global name 'c_int' is not defined
EdChum
  • 376,765
  • 198
  • 813
  • 562
geotheory
  • 22,624
  • 29
  • 119
  • 196

1 Answers1

2

This looks like a bug in pyprocessing. You are using version 1.2.7, and in that version, the file flippolicy.py refers to c_int, but that name is not defined anywhere. In the current source code at http://code.google.com/p/pyprocessing/source/browse/trunk/pyprocessing/flippolicy.py, there is now the line from ctypes import *, which defines c_int. The change is also in the latest version, 1.3.22. Can you upgrade and try again?

Warren Weckesser
  • 110,654
  • 19
  • 194
  • 214