# Processing.py

**URL:** https://discourse.processing.org/c/processing-py/9.md?page=6

[Latest](https://discourse.processing.org/latest.md) · [Categories](https://discourse.processing.org/categories.md) · [Tags](https://discourse.processing.org/tags.md)

**Page:** 7

---

## [What is Tkinter?](https://discourse.processing.org/t/what-is-tkinter/30209)

<div class="topic-metadata">

**Author:** [@bridgette](https://discourse.processing.org/u/bridgette)\
**Replies:** 3\
**Last updated:** [May 22, 2021, 1:09am UTC](https://discourse.processing.org/t/what-is-tkinter/30209 "2021-05-22T01:09:45Z")

</div>

Hi! I have a project in where I have to create a currency converter, so when I searched up examples, a lot of them were using Tkinter and the coding looked really complicated. What exactly is Tkinter? and Is there a way…

---

## [resetMatrix() has unexpected result in P3D (or, how to display "HUD" text?)](https://discourse.processing.org/t/resetmatrix-has-unexpected-result-in-p3d-or-how-to-display-hud-text/30131)

<div class="topic-metadata">

**Author:** [@villares](https://discourse.processing.org/u/villares)\
**Replies:** 3\
**Last updated:** [May 17, 2021, 5:48pm UTC](https://discourse.processing.org/t/resetmatrix-has-unexpected-result-in-p3d-or-how-to-display-hud-text/30131 "2021-05-17T17:48:19Z")

</div>

I was trying to draw some text inside a pushMattrix/popMatrix by using resetMatrix, it works well in 2D but not in P3D, any pointers to what I’m doing wrong? size(500, 500) # then try size(500, 500, P3D) textSize(40…

---

## [Self.parent.parent\_?](https://discourse.processing.org/t/self-parent-parent/29855)

<div class="topic-metadata">

**Author:** [@Mayarch](https://discourse.processing.org/u/Mayarch)\
**Replies:** 11\
**Last updated:** [May 6, 2021, 2:44pm UTC](https://discourse.processing.org/t/self-parent-parent/29855 "2021-05-06T14:44:57Z")

</div>

class LineAgent(IParticle): def init(self, parent, dir): IParticle.init(self, parent.pos().cp(dir)) self.parent = parent self.dir = dir self.hide() self.fric(0.2) self.isColliding = False def upd…

---

## [Help processing 2.0 python](https://discourse.processing.org/t/help-processing-2-0-python/29534)

<div class="topic-metadata">

**Author:** [@BeastBoy3108](https://discourse.processing.org/u/BeastBoy3108)\
**Replies:** 4\
**Last updated:** [April 23, 2021, 6:09am UTC](https://discourse.processing.org/t/help-processing-2-0-python/29534 "2021-04-23T06:09:43Z")

</div>

Hi, I am a elementary schooler, and I started collabbing with my friend in python. He would make the sprites, I would code. We are making Super Mario Brothers stage 1-1, because the whole game would take us too long time…

---

## [Java error for Processing.py from command line on MacOS](https://discourse.processing.org/t/java-error-for-processing-py-from-command-line-on-macos/29473)

<div class="topic-metadata">

**Author:** [@bielorusse](https://discourse.processing.org/u/bielorusse)\
**Replies:** 0\
**Last updated:** [April 18, 2021, 5:36pm UTC](https://discourse.processing.org/t/java-error-for-processing-py-from-command-line-on-macos/29473 "2021-04-18T17:36:07Z")

</div>

Hi, I would like to use Processing.py from the command line on a MacOS machine. I followed these “Processing.py from command line” instructions for the installation. It seems I have an issue with the Java installation…

---

## [Timer in Python mode](https://discourse.processing.org/t/timer-in-python-mode/29286)

<div class="topic-metadata">

**Author:** [@nktlst](https://discourse.processing.org/u/nktlst)\
**Replies:** 3\
**Last updated:** [April 12, 2021, 8:59pm UTC](https://discourse.processing.org/t/timer-in-python-mode/29286 "2021-04-12T20:59:07Z")

</div>

I need timer, which resets when I press keyboard key (for example). I did basic timer, but it not resets, I understand why but I can’t figure it out how to make my class resets on key board hit. For example I need “stop”…

---

## [Read data from csv file](https://discourse.processing.org/t/read-data-from-csv-file/29248)

<div class="topic-metadata">

**Author:** [@fleshcircuit](https://discourse.processing.org/u/fleshcircuit)\
**Replies:** 5\
**Last updated:** [April 10, 2021, 12:22pm UTC](https://discourse.processing.org/t/read-data-from-csv-file/29248 "2021-04-10T12:22:27Z")

</div>

Hello, I am working on a project where I would like to read data from a csv file using python mode. From what I can gather, I need to create a Reader, though I am uncertain how to do so (please note that I am a self tau…

---

## [Random Colors with Shapes](https://discourse.processing.org/t/random-colors-with-shapes/29034)

<div class="topic-metadata">

**Author:** [@bridgette](https://discourse.processing.org/u/bridgette)\
**Replies:** 12\
**Last updated:** [April 4, 2021, 12:29am UTC](https://discourse.processing.org/t/random-colors-with-shapes/29034 "2021-04-04T00:29:25Z")

</div>

Hello, I’m new to processing and my task is to display shapes with randomized colors. size(700,700) background('#FF4477') translate(random(100, 500), 30) fill('#E3AB62') noStroke() ellipse(random(100, 120), random (…

---

## [PLEASE HELP: creating a generator (astro signs)](https://discourse.processing.org/t/please-help-creating-a-generator-astro-signs/28933)

<div class="topic-metadata">

**Author:** [@anon](https://discourse.processing.org/u/anon)\
**Replies:** 20\
**Last updated:** [March 30, 2021, 10:36am UTC](https://discourse.processing.org/t/please-help-creating-a-generator-astro-signs/28933 "2021-03-30T10:36:35Z")

</div>

hello! so im new to processing and i have no clue what im doing and im supposed to be creating a generator of some sort. ive used else, if statements and i think that works. so when i put in my values i get the answer p…

---

## [How to receive tab control event in Python mode](https://discourse.processing.org/t/how-to-receive-tab-control-event-in-python-mode/28944)

<div class="topic-metadata">

**Author:** [@uraich](https://discourse.processing.org/u/uraich)\
**Replies:** 3\
**Last updated:** [March 30, 2021, 7:58am UTC](https://discourse.processing.org/t/how-to-receive-tab-control-event-in-python-mode/28944 "2021-03-30T07:58:23Z")

</div>

I have some controlP5 code in Java that I want to port to Python. It uses tabs and captures the control event when the tab is changed. However, in Python I don’t see these events. What do I have to do to capture these c…

---

## [Translate function acting strangely (inverted)](https://discourse.processing.org/t/translate-function-acting-strangely-inverted/28935)

<div class="topic-metadata">

**Author:** [@mangouste77](https://discourse.processing.org/u/mangouste77)\
**Replies:** 1\
**Last updated:** [March 29, 2021, 3:27am UTC](https://discourse.processing.org/t/translate-function-acting-strangely-inverted/28935 "2021-03-29T03:27:11Z")

</div>

Hi, I’m learning processing and python with Peter Farrell Math Adventures. I’m coding Madlebrot set rendering and strangly I have to remove the translate(width/2,height/2) line to have the set origin centered. If I l…

---

## [Python perlin noise loop help](https://discourse.processing.org/t/python-perlin-noise-loop-help/28879)

<div class="topic-metadata">

**Author:** [@Laygos](https://discourse.processing.org/u/Laygos)\
**Replies:** 2\
**Last updated:** [March 26, 2021, 8:42pm UTC](https://discourse.processing.org/t/python-perlin-noise-loop-help/28879 "2021-03-26T20:42:21Z")

</div>

Hi! I’m unable to get my loop to loop :sweat: I was following the video bellow: the code I followed is shown roughly around the 12 min mark. def setup(): size(900,900) def draw(): background(0) …

---

## [Can I Use Processing to Make An MP4?](https://discourse.processing.org/t/can-i-use-processing-to-make-an-mp4/28788)

<div class="topic-metadata">

**Author:** [@PatrickPowers](https://discourse.processing.org/u/PatrickPowers)\
**Replies:** 3\
**Last updated:** [March 24, 2021, 11:17am UTC](https://discourse.processing.org/t/can-i-use-processing-to-make-an-mp4/28788 "2021-03-24T11:17:27Z")

</div>

I have a program written in Python geometric algebra that produces animations as mp4s. It is quite crude and I’m looking for something better. The requirements are: Geometric algebra Ability to draw ellipses. Can prod…

---

## [I can't change mode](https://discourse.processing.org/t/i-cant-change-mode/28732)

<div class="topic-metadata">

**Author:** [@wyqsuy](https://discourse.processing.org/u/wyqsuy)\
**Replies:** 6\
**Last updated:** [March 23, 2021, 10:43am UTC](https://discourse.processing.org/t/i-cant-change-mode/28732 "2021-03-23T10:43:40Z")

</div>

I wanted to use processing to program in python, but I can’t change the mode to python. I’ve got a message box saying: . I don’t know what happened. Can somebody help me?

---

## [March 14 is Pi Day](https://discourse.processing.org/t/march-14-is-pi-day/28516)

<div class="topic-metadata">

**Author:** [@javagar](https://discourse.processing.org/u/javagar)\
**Replies:** 0\
**Last updated:** [March 14, 2021, 2:04am UTC](https://discourse.processing.org/t/march-14-is-pi-day/28516 "2021-03-14T02:04:42Z")

</div>

March 14 is Pi Day, so let’s use a Monte Carlo method to estimate π. See: Wikipedia: Pi Wikipedia: Pi Day One Monte Carlo method for computing π is to draw a circle inscribed in a square, and randomly place dots in …

---

## [How globals works in mouse interactions functions (python)](https://discourse.processing.org/t/how-globals-works-in-mouse-interactions-functions-python/28333)

<div class="topic-metadata">

**Author:** [@nuanz](https://discourse.processing.org/u/nuanz)\
**Replies:** 2\
**Last updated:** [March 10, 2021, 10:29pm UTC](https://discourse.processing.org/t/how-globals-works-in-mouse-interactions-functions-python/28333 "2021-03-10T22:29:47Z")

</div>

Hi guys ! We’re actually trying to create an interface in processing to play chess. The problem is the following: if the user clicks on something that isn’t empty (mouseClicked()), a global var named “pieceClicked” t…

---

## [Upload a python file to OpenProcessing](https://discourse.processing.org/t/upload-a-python-file-to-openprocessing/28262)

<div class="topic-metadata">

**Author:** [@Aro](https://discourse.processing.org/u/Aro)\
**Replies:** 3\
**Last updated:** [March 5, 2021, 11:36pm UTC](https://discourse.processing.org/t/upload-a-python-file-to-openprocessing/28262 "2021-03-05T23:36:40Z")

</div>

Hello, I am wondering if there is any way to upload a python file to OpenProcessing ? It seems that only P5js and Pjs can be used. However I’ve seen someone manage to make it work here. He uses a function called runPyCod…

---

## [Discrete Vectors](https://discourse.processing.org/t/discrete-vectors/3942)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 22\
**Last updated:** [February 27, 2021, 1:02am UTC](https://discourse.processing.org/t/discrete-vectors/3942 "2021-02-27T01:02:59Z")

</div>

Dear all, I’ve recently stumbled across a series of rendered drawings made with Grasshopper and got particularly interested in this one. It is made from a combination of components called “Discrete Vectors” (part of…

---

## [Using json data to change colour](https://discourse.processing.org/t/using-json-data-to-change-colour/27958)

<div class="topic-metadata">

**Author:** [@fleshcircuit](https://discourse.processing.org/u/fleshcircuit)\
**Replies:** 3\
**Last updated:** [February 21, 2021, 11:22am UTC](https://discourse.processing.org/t/using-json-data-to-change-colour/27958 "2021-02-21T11:22:53Z")

</div>

Hello, I am trying to create a sketch that uses from a json file to r value to change colour. In the terminal, it shows the value changing, but the colour are not changing. Here is code: import json def setup(): s…

---

## [Serialization with pickle or otherwise (how to make PImage serializable?)](https://discourse.processing.org/t/serialization-with-pickle-or-otherwise-how-to-make-pimage-serializable/27823)

<div class="topic-metadata">

**Author:** [@villares](https://discourse.processing.org/u/villares)\
**Replies:** 0\
**Last updated:** [February 14, 2021, 7:31pm UTC](https://discourse.processing.org/t/serialization-with-pickle-or-otherwise-how-to-make-pimage-serializable/27823 "2021-02-14T19:31:34Z")

</div>

I usually use Python’s pickle module for serialization. But it doesn’t work with Processing objects from PImage, or PVector. There is this other Java strategy that has the same problem. from java import io def saveObje…

---

## [Help with noise to animate](https://discourse.processing.org/t/help-with-noise-to-animate/27801)

<div class="topic-metadata">

**Author:** [@Laygos](https://discourse.processing.org/u/Laygos)\
**Replies:** 2\
**Last updated:** [February 14, 2021, 4:34pm UTC](https://discourse.processing.org/t/help-with-noise-to-animate/27801 "2021-02-14T16:34:16Z")

</div>

Using Processing 3 in Python mode, I’m unable to get my ellipse to animate. \</ Xoff = 0 def setup(): size(800,900) def draw(): global Xoff background(0) x = map(noise(Xoff),0,1,0,width) ellipse(x,200,50,50) x +=…

---

## [Help: animate radiating circles](https://discourse.processing.org/t/help-animate-radiating-circles/27682)

<div class="topic-metadata">

**Author:** [@TuxGirl](https://discourse.processing.org/u/TuxGirl)\
**Replies:** 4\
**Last updated:** [February 9, 2021, 9:35pm UTC](https://discourse.processing.org/t/help-animate-radiating-circles/27682 "2021-02-09T21:35:45Z")

</div>

I’m trying to make circles that radiate outwards s.t there is a white wave, with ligher color than the background. Sometimes this works, but other times the color remains even. I would also like darker circles over top…

---

## [Autoformatting pains / Tool ideas?](https://discourse.processing.org/t/autoformatting-pains-tool-ideas/27369)

<div class="topic-metadata">

**Author:** [@villares](https://discourse.processing.org/u/villares)\
**Replies:** 3\
**Last updated:** [January 25, 2021, 11:36pm UTC](https://discourse.processing.org/t/autoformatting-pains-tool-ideas/27369 "2021-01-25T23:36:32Z")

</div>

So I have a new Linux machine and Ctrl+T code formatting is not working anymore on Processing Python mode. I had this issue before and I don’t know how to solve it… it seems to be related to permissions/network access be…

---

## [Another "python mode not working" problem](https://discourse.processing.org/t/another-python-mode-not-working-problem/27235)

<div class="topic-metadata">

**Author:** [@Sayochi](https://discourse.processing.org/u/Sayochi)\
**Replies:** 2\
**Last updated:** [January 20, 2021, 7:47pm UTC](https://discourse.processing.org/t/another-python-mode-not-working-problem/27235 "2021-01-20T19:47:34Z")

</div>

I downloaded processing few hours ago and wanted to try python mode(3063) but it doesnt work. it gives empty lines in logs. I checked other similar posts too but no luck. tried downloading the mode manually from site, tu…

---

## [Transparency not working as expected](https://discourse.processing.org/t/transparency-not-working-as-expected/27151)

<div class="topic-metadata">

**Author:** [@chupo\_cro](https://discourse.processing.org/u/chupo_cro)\
**Replies:** 10\
**Last updated:** [January 18, 2021, 9:25pm UTC](https://discourse.processing.org/t/transparency-not-working-as-expected/27151 "2021-01-18T21:25:23Z")

</div>

I’ve made a simple program for displaying the pixels stored in a framebuffer by drawing the squares and everything is working well except I can’t explain the visible lines between the squares when I draw them with a tran…

---

## [Bug with python mode](https://discourse.processing.org/t/bug-with-python-mode/26533)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 10\
**Last updated:** [December 28, 2020, 6:55pm UTC](https://discourse.processing.org/t/bug-with-python-mode/26533 "2020-12-28T18:55:11Z")

</div>

txt = '1'; def setup(): size(600,600) noFill() noStroke() def draw(): fill('#FF0000') # red quadrant rect(width/2,0, width/2,height/2) fill('#004477') # blue quadrant rect(0,0, width/2,he…

---

## [Using IO Library with Processing.py](https://discourse.processing.org/t/using-io-library-with-processing-py/26956)

<div class="topic-metadata">

**Author:** [@witlogic](https://discourse.processing.org/u/witlogic)\
**Replies:** 3\
**Last updated:** [January 10, 2021, 10:34pm UTC](https://discourse.processing.org/t/using-io-library-with-processing-py/26956 "2021-01-10T22:34:31Z")

</div>

I’m trying to use Processing.py to read GPIO pins on a Raspberry Pi. I haven’t been able to find any examples of IO library for Processing.py. I’ve added the IO library, but can’t figure out right syntax to access the …

---

## [Processing.py issues with saveFrame(): bug or a mistake on my end?](https://discourse.processing.org/t/processing-py-issues-with-saveframe-bug-or-a-mistake-on-my-end/26863)

<div class="topic-metadata">

**Author:** [@ginataka](https://discourse.processing.org/u/ginataka)\
**Replies:** 9\
**Last updated:** [January 9, 2021, 4:37pm UTC](https://discourse.processing.org/t/processing-py-issues-with-saveframe-bug-or-a-mistake-on-my-end/26863 "2021-01-09T16:37:02Z")

</div>

Hi all, I’ve been making some really simple, noobish programs and haven’t had any issues until writing one that uses the P2D renderer. I’ve been searching online and have found folks having similar issues, but I can’t s…

---

## [Can someone help me please? (QUIZ)](https://discourse.processing.org/t/can-someone-help-me-please-quiz/26698)

<div class="topic-metadata">

**Author:** [@Hamedwow](https://discourse.processing.org/u/Hamedwow)\
**Replies:** 13\
**Last updated:** [January 7, 2021, 1:14pm UTC](https://discourse.processing.org/t/can-someone-help-me-please-quiz/26698 "2021-01-07T13:14:59Z")

</div>

Hi everyone , I have made 1 board game with pawn’s and i have to add MCQ’s in so that when pawn’s moves on one of the place’s like (PHP, PYTHON, JAVA) it has to show automatically the questions and answers one by one. …

---

## [MCQ screen and get the questions and answers one by one (multiple choice quiz)](https://discourse.processing.org/t/mcq-screen-and-get-the-questions-and-answers-one-by-one-multiple-choice-quiz/26837)

<div class="topic-metadata">

**Author:** [@Hamedwow](https://discourse.processing.org/u/Hamedwow)\
**Replies:** 1\
**Last updated:** [January 6, 2021, 7:50pm UTC](https://discourse.processing.org/t/mcq-screen-and-get-the-questions-and-answers-one-by-one-multiple-choice-quiz/26837 "2021-01-06T19:50:10Z")

</div>

Hi guys , I have made a board game and i want to get Questions and answers as MCQ’s . I have made a list but when i run my boardgame it shows all the questions and answers . i want it to show me ONE question AND answer f…

[Previous page](https://discourse.processing.org/c/processing-py/9.md?page=5)

[Next page](https://discourse.processing.org/c/processing-py/9.md?page=7)
