Questions tagged [pyprocessing]

It provides a Python package that creates an environment for graphics applications that closely resembles that of the Processing system.

About

The project mission is to implement Processing's friendly graphics functions and interaction model in Python. Not all of Processing is to be ported, though, since Python itself already provides alternatives for many features of Processing, such as XML parsing.

The pyprocessing backend is built upon OpenGL and Pyglet, which provide the actual graphics rendering. Since these are multiplatform, so is pyprocessing.

Links

13 questions
48
votes
1 answer

How to set the output size in GraphViz for the dot format?

I want to make sure, that all nodes are within some range (say [0,0,W,H]) after layout. I figured bounding box would be the solution by using the bb attribute, but both dot and neato simply overwrite it. For example my graph: strict digraph { …
shinjin
  • 2,858
  • 5
  • 29
  • 44
1
vote
1 answer

Constructing a instance variable pyparsing matcher from class variable elements

With pyparsing I construct a complex matcher object which is suppose to match slightly different things depending on a instantiation flag. Here a (simplified) example: class MyMatcher(): def __init__( self, special_flag = False): …
halloleo
  • 9,216
  • 13
  • 64
  • 122
1
vote
1 answer

How do i make an image move in Python Mode for Processing?

The movement part is all the way at the bottom How do I make an image move in Python Mode for Processing? I tried everything and there are no tutorials on PyProcessing. Please Help another way i tried is: if keyPressed(39): (39 is right arrow key is…
DmesticG
  • 11
  • 1
1
vote
0 answers

3D drawing to PDF

I cannot work out how to render a 3D drawing to a PDF file in the python mode of Processing. Here's an example of a drawing: size(400, 400, P3D) noStroke() background(0) directionalLight(100, 100, 100, 100, 100, -100) translate(width / 2, height /…
Michael Dunn
  • 8,163
  • 4
  • 37
  • 54
1
vote
0 answers

pyprocessing doesn't quit on Windows

Here is a quote from the pyprocessing Usage Instructions wiki: In principle, run() does not return, but you can terminate the application by typing the ESC key. If I start pyprocessing interactively (not using subprocess.call as per this SO…
LondonRob
  • 73,083
  • 37
  • 144
  • 201
1
vote
1 answer

TypeError: super(type, obj) when running pyprocessing script interactively

Python 2.7.3: Create the simplest possible pyprocessing file and save it as foo.py: from pyprocessing import * def setup(): size(100,100) def draw(): rect(10,10,10,10) run() Now in python: >>> execfile('foo.py') The file runs as…
LondonRob
  • 73,083
  • 37
  • 144
  • 201
1
vote
1 answer

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…
geotheory
  • 22,624
  • 29
  • 119
  • 196
0
votes
1 answer

Python Chess Piece Movement

I have run into problems generating valid pieces for chess pieces in an early work-in-progress chess game in Python... I have run into trouble with the Bishop. Here is a glimpse of my program... the lower right white bishop is selected, and the red…
myang0630
  • 111
  • 5
0
votes
1 answer

Can't access pyFirmata from Processing.py

The following code produces an error message in the Processing IDE: from pyfirmata import Arduino,util "No module named pyfirmata" I have no problem running the code directly in the python 2.7 interpreter. But, I can't access the Processing API from…
Kri-ban
  • 536
  • 5
  • 17
0
votes
1 answer

How correctly draw boxes in pyprocessing?

I'm trying to write a very basic box drawing program using pyprocessing, but a condition to check if the mouse is within a box fails, when the logic looks ok: #!/usr/bin/env python from pyprocessing import * S = 20 W = 5 H = 5 data = [[0] * W] *…
George Profenza
  • 50,687
  • 19
  • 144
  • 218
0
votes
1 answer

Working With Audio in PyProcessing

I am learning Pyprocessing. It comes with the regular processing platform that originally was written in Java. Many of the example projects that come bundled with processing have also been written in Python but not any of the audio…
0
votes
0 answers

Tic Tac Toe AI with PyProcessing

I didn't know what sort of title to give this post. I'm a new to python, and I'm 4 weeks into my first class. I wrote a Tic Tac Toe program with an AI, but the AI is weird. It behaves differently at my home PC than at my school PC. At school, the…
IntrepidPig
  • 110
  • 2
  • 12
-6
votes
1 answer

Python single line for loops

I'm using processing.py I was following this tut (Java) https://www.youtube.com/watch?v=H7frvcAHXps and I'm wondering if I can use the same kind of for loop in python for(int y = 0; y < height; y = y + cellSize): for(int x = 0; x < width; x = x…