geotheory
geotheory

Reputation: 23670

Python fails to run a Pyprocessing script

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

Upvotes: 1

Views: 1010

Answers (1)

Warren Weckesser
Warren Weckesser

Reputation: 114921

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?

Upvotes: 2

Related Questions