# Processing.py

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

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

**Page:** 6

---

## [How does Python Mode actually work?](https://discourse.processing.org/t/how-does-python-mode-actually-work/32008)

<div class="topic-metadata">

**Author:** [@LindowMan](https://discourse.processing.org/u/LindowMan)\
**Replies:** 4\
**Last updated:** [September 5, 2021, 5:54pm UTC](https://discourse.processing.org/t/how-does-python-mode-actually-work/32008 "2021-09-05T17:54:30Z")

</div>

Out of personal interest, and to get to understand Processing better: How does Python Mode actually work? When I started with Python Mode I was already wondering because I can’t recall having had to tell Processing whe…

---

## [Trouble loading image](https://discourse.processing.org/t/trouble-loading-image/31915)

<div class="topic-metadata">

**Author:** [@LindowMan](https://discourse.processing.org/u/LindowMan)\
**Replies:** 9\
**Last updated:** [August 31, 2021, 4:04pm UTC](https://discourse.processing.org/t/trouble-loading-image/31915 "2021-08-31T16:04:11Z")

</div>

Really can’t see what the problem is supposed to be here. def setup(): img = loadImage("b2.jpg") size(img.width, img.height) Result is the following error: processing.app.SketchException: NameError: global nam…

---

## [mousePressed with multiple windows](https://discourse.processing.org/t/mousepressed-with-multiple-windows/31947)

<div class="topic-metadata">

**Author:** [@stef0206](https://discourse.processing.org/u/stef0206)\
**Replies:** 2\
**Last updated:** [August 30, 2021, 4:12pm UTC](https://discourse.processing.org/t/mousepressed-with-multiple-windows/31947 "2021-08-30T16:12:29Z")

</div>

I am working with processingpy and wanted to make a drawing program, I’ve created a basic color picker in one window, and then created a seperate one for drawing, but when I attempt to use mousePressed in the new window …

---

## [No Python in Processing 4?](https://discourse.processing.org/t/no-python-in-processing-4/31979)

<div class="topic-metadata">

**Author:** [@bcabc](https://discourse.processing.org/u/bcabc)\
**Replies:** 1\
**Last updated:** [August 28, 2021, 4:47am UTC](https://discourse.processing.org/t/no-python-in-processing-4/31979 "2021-08-28T04:47:08Z")

</div>

Hi there - I am trying to run Processing 4 with “Python Mode for Processing 3” on OSX 10.14.16. As of now, no example seems to work. I tried simply printing a message to the console - and no luck. I tried a clean inst…

---

## [Mirroring lists for symmetrical images](https://discourse.processing.org/t/mirroring-lists-for-symmetrical-images/31844)

<div class="topic-metadata">

**Author:** [@LindowMan](https://discourse.processing.org/u/LindowMan)\
**Replies:** 2\
**Last updated:** [August 25, 2021, 8:18am UTC](https://discourse.processing.org/t/mirroring-lists-for-symmetrical-images/31844 "2021-08-25T08:18:28Z")

</div>

Hi! I am working on a sketch to generate symmetrical patterns consisting of 4 parts. Right now I am just using random values for testing. The way it works is that I generate an initial list of lists of random values. Ea…

---

## [Py5 Thonny plug-in](https://discourse.processing.org/t/py5-thonny-plug-in/31902)

<div class="topic-metadata">

**Author:** [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Replies:** 0\
**Last updated:** [August 24, 2021, 11:01pm UTC](https://discourse.processing.org/t/py5-thonny-plug-in/31902 "2021-08-24T23:01:06Z")

</div>

If you’re keen to explore py5 as a Python-based Processing alternative, then the Thonny IDE is a great way to do so. I’ve created a plug-in to simplify the setup involved. Here’s the GitHub repo with the installation ste…

---

## [Set size() from calculations within the sketch](https://discourse.processing.org/t/set-size-from-calculations-within-the-sketch/31594)

<div class="topic-metadata">

**Author:** [@LindowMan](https://discourse.processing.org/u/LindowMan)\
**Replies:** 4\
**Last updated:** [August 6, 2021, 12:39pm UTC](https://discourse.processing.org/t/set-size-from-calculations-within-the-sketch/31594 "2021-08-06T12:39:09Z")

</div>

Hi! I searched the forum but didn’t really find an answer… I have a sketch that generates a list of lists of integers(it’s what the apply\_rule function in the screenshot does). Some calculations are performed and I …

---

## [Monty Hall Simulation Problem](https://discourse.processing.org/t/monty-hall-simulation-problem/31481)

<div class="topic-metadata">

**Author:** [@adisharma](https://discourse.processing.org/u/adisharma)\
**Replies:** 8\
**Last updated:** [July 31, 2021, 4:54pm UTC](https://discourse.processing.org/t/monty-hall-simulation-problem/31481 "2021-07-31T16:54:51Z")

</div>

Hello Everyone, I am working on Monty Hall Simulation Problem Project and I am looking for source code. I have checked on github and found this source but I want to know below code is optimize or not as a speed and size …

---

## [How to simulate overlapping/blocking of objects](https://discourse.processing.org/t/how-to-simulate-overlapping-blocking-of-objects/31204)

<div class="topic-metadata">

**Author:** [@slashwreck](https://discourse.processing.org/u/slashwreck)\
**Replies:** 5\
**Last updated:** [July 18, 2021, 7:51pm UTC](https://discourse.processing.org/t/how-to-simulate-overlapping-blocking-of-objects/31204 "2021-07-18T19:51:45Z")

</div>

Have a simple script that draws some overlapping noisy polygons. When you fill the polygons, the resulting shape looks like a rough cylinder, because the ‘behind’ parts of the polygons are obscured. But when I sen…

---

## [Problem with Stroke Transparency in Plotting Points](https://discourse.processing.org/t/problem-with-stroke-transparency-in-plotting-points/31313)

<div class="topic-metadata">

**Author:** [@javagar](https://discourse.processing.org/u/javagar)\
**Replies:** 4\
**Last updated:** [July 18, 2021, 11:05am UTC](https://discourse.processing.org/t/problem-with-stroke-transparency-in-plotting-points/31313 "2021-07-18T11:05:30Z")

</div>

I have encountered a problem with the alpha color component when experimenting with plotting points to represent Collatz orbits. See Wikipedia: Collatz conjecture. This code does what is expected: # plots Collatz orbit…

---

## [Displaying text letter by letter](https://discourse.processing.org/t/displaying-text-letter-by-letter/31099)

<div class="topic-metadata">

**Author:** [@Polo](https://discourse.processing.org/u/Polo)\
**Replies:** 3\
**Last updated:** [July 7, 2021, 3:34pm UTC](https://discourse.processing.org/t/displaying-text-letter-by-letter/31099 "2021-07-07T15:34:37Z")

</div>

Hello everyone, I’m a school-level beginner programmer and I’m trying to display text letter by letter. There is something that I don’t understand about my code, because it works perfectly on a console but just doesn’t u…

---

## [Cursor() issue in processing.py (python mode)](https://discourse.processing.org/t/cursor-issue-in-processing-py-python-mode/31062)

<div class="topic-metadata">

**Author:** [@JSGauthier](https://discourse.processing.org/u/JSGauthier)\
**Replies:** 6\
**Last updated:** [July 5, 2021, 6:09pm UTC](https://discourse.processing.org/t/cursor-issue-in-processing-py-python-mode/31062 "2021-07-05T18:09:57Z")

</div>

I have been encountering a recurring issue in Python mode (processing 3.5.4). If I add cursor(HAND) to my sketch, regardless of which definition I place it under (either setup() or draw(), even in setting() ), The curso…

---

## [Numpy with Trinket and-or with Python mode](https://discourse.processing.org/t/numpy-with-trinket-and-or-with-python-mode/19409)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 11\
**Last updated:** [June 25, 2021, 9:52am UTC](https://discourse.processing.org/t/numpy-with-trinket-and-or-with-python-mode/19409 "2021-06-25T09:52:22Z")

</div>

---

## [New Python Processing project: Py5](https://discourse.processing.org/t/new-python-processing-project-py5/30837)

<div class="topic-metadata">

**Author:** [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Replies:** 12\
**Last updated:** [June 25, 2021, 8:17am UTC](https://discourse.processing.org/t/new-python-processing-project-py5/30837 "2021-06-25T08:17:40Z")

</div>

I’ve been experimenting with py5. It’s a creative coding framework for Python 3.8 and up – a Python version of Processing – and potentially a new engine for Python Mode in the Processing IDE. Internally, py5 employs Proc…

---

## [How to install and import jgrapht in Python mode](https://discourse.processing.org/t/how-to-install-and-import-jgrapht-in-python-mode/25620)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 12\
**Last updated:** [June 17, 2021, 11:09am UTC](https://discourse.processing.org/t/how-to-install-and-import-jgrapht-in-python-mode/25620 "2021-06-17T11:09:43Z")

</div>

Hi all, I have an issue installing and using the latest version of jgrapht with Python mode. I used to work with an older version tailored for Processing but that port is very limited and is missing most of the function…

---

## [Python Mode for Processing 4 alpha](https://discourse.processing.org/t/python-mode-for-processing-4-alpha/30760)

<div class="topic-metadata">

**Author:** [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Replies:** 0\
**Last updated:** [June 17, 2021, 10:49am UTC](https://discourse.processing.org/t/python-mode-for-processing-4-alpha/30760 "2021-06-17T10:49:42Z")

</div>

For anybody who wants to help test this – Download this file: https://github.com/tabreturn/processing.py-for-processing-4/raw/main/PythonMode-4.0a4.zip Extract it and place the PythonMode directory in your sketchbook m…

---

## [Generate new object (class) on button (key) hit](https://discourse.processing.org/t/generate-new-object-class-on-button-key-hit/30681)

<div class="topic-metadata">

**Author:** [@nktlst](https://discourse.processing.org/u/nktlst)\
**Replies:** 4\
**Last updated:** [June 14, 2021, 11:03am UTC](https://discourse.processing.org/t/generate-new-object-class-on-button-key-hit/30681 "2021-06-14T11:03:07Z")

</div>

I created class with animated circle and then I want to create same objects every time I hit keyboard button… Problem that when I hit button here is always same object and animation disappear when button release… On but…

---

## [How to make hangman in Processing.py (Solved)](https://discourse.processing.org/t/how-to-make-hangman-in-processing-py-solved/30499)

<div class="topic-metadata">

**Author:** [@SilentStorm](https://discourse.processing.org/u/SilentStorm)\
**Replies:** 17\
**Last updated:** [June 8, 2021, 4:34pm UTC](https://discourse.processing.org/t/how-to-make-hangman-in-processing-py-solved/30499 "2021-06-08T16:34:59Z")

</div>

Hey all, so I’m trying to make a Hangman game in Processing.py and have written code for both how I want it to look, as well as separate code to run the game. The problem is combining the two in Processing. Is there a wa…

---

## [Python vs java advantages](https://discourse.processing.org/t/python-vs-java-advantages/30468)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 5\
**Last updated:** [June 7, 2021, 6:46am UTC](https://discourse.processing.org/t/python-vs-java-advantages/30468 "2021-06-07T06:46:55Z")

</div>

does one language have any advantage over the other ie performance or libraries?

---

## [Making Hangman Game in Processing.py](https://discourse.processing.org/t/making-hangman-game-in-processing-py/30495)

<div class="topic-metadata">

**Author:** [@SilentStorm](https://discourse.processing.org/u/SilentStorm)\
**Replies:** 1\
**Last updated:** [June 5, 2021, 8:33pm UTC](https://discourse.processing.org/t/making-hangman-game-in-processing-py/30495 "2021-06-05T20:33:04Z")

</div>

Hey all, so I’m trying to make a Hangman game in Processing.py and have written code for both how I want it to look, as well as separate code to run the game. The problem is combining the two in Processing. Is there a wa…

---

## [Loop animated .gif in python mode](https://discourse.processing.org/t/loop-animated-gif-in-python-mode/30479)

<div class="topic-metadata">

**Author:** [@JSGauthier](https://discourse.processing.org/u/JSGauthier)\
**Replies:** 2\
**Last updated:** [June 3, 2021, 9:12pm UTC](https://discourse.processing.org/t/loop-animated-gif-in-python-mode/30479 "2021-06-03T21:12:32Z")

</div>

Hello, Is there a way to sequence all frames from an animated .gif (in a loop) in python mode? I would like to run my .gifs without having to load each frame as a seperate file in the /data folder. Thanks. please fo…

---

## [Using gifAnimation library on Python Mode](https://discourse.processing.org/t/using-gifanimation-library-on-python-mode/24577)

<div class="topic-metadata">

**Author:** [@villares](https://discourse.processing.org/u/villares)\
**Replies:** 1\
**Last updated:** [June 4, 2021, 2:21am UTC](https://discourse.processing.org/t/using-gifanimation-library-on-python-mode/24577 "2021-06-04T02:21:56Z")

</div>

I have answered this today on Stack Overflow and I think it might be useful for someone: Just to be clear about libraries with Processing Python mode: You can use “pure Python” libraries; You can’t use Python librarie…

---

## [Please Help: Issue with 3D](https://discourse.processing.org/t/please-help-issue-with-3d/30290)

<div class="topic-metadata">

**Author:** [@bridgette](https://discourse.processing.org/u/bridgette)\
**Replies:** 24\
**Last updated:** [May 31, 2021, 12:45pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290 "2021-05-31T12:45:50Z")

</div>

hi guys can anyone help me out please im sorta really stuck. im trying to draw a sphere onto processing but anytime i use P3D, the display image is just grey and blank. does anyone know why?

---

## [Please Help: Currency Converter](https://discourse.processing.org/t/please-help-currency-converter/30250)

<div class="topic-metadata">

**Author:** [@bridgette](https://discourse.processing.org/u/bridgette)\
**Replies:** 9\
**Last updated:** [May 27, 2021, 11:25am UTC](https://discourse.processing.org/t/please-help-currency-converter/30250 "2021-05-27T11:25:25Z")

</div>

Hello! I have an assignment coming up where I have to create a currency converter using python, but I’m really confused on where or how to begin. Does anyone have any tips on how I could start? Like how would I make a s…

---

## [Please Help: How to add texture](https://discourse.processing.org/t/please-help-how-to-add-texture/30311)

<div class="topic-metadata">

**Author:** [@bridgette](https://discourse.processing.org/u/bridgette)\
**Replies:** 6\
**Last updated:** [May 26, 2021, 1:54pm UTC](https://discourse.processing.org/t/please-help-how-to-add-texture/30311 "2021-05-26T13:54:16Z")

</div>

Hello, I wanted to create a sphere with texture on it. So I tried to make the image wrap around the sphere, but when I run the code, only the rotating sphere shows. Is there something wrong with the code? def setup(): …

---

## [How to display random numbers](https://discourse.processing.org/t/how-to-display-random-numbers/30298)

<div class="topic-metadata">

**Author:** [@bridgette](https://discourse.processing.org/u/bridgette)\
**Replies:** 11\
**Last updated:** [May 26, 2021, 6:20pm UTC](https://discourse.processing.org/t/how-to-display-random-numbers/30298 "2021-05-26T18:20:28Z")

</div>

Hello, I’m trying to figure out how to create random numbers that displays on the screen. My code is animated, so the text moves as well and I’m not sure how to stop it. Does anyone know how? Could I use Boolean somehow…

---

## [Help urgent! serial number generator!](https://discourse.processing.org/t/help-urgent-serial-number-generator/30313)

<div class="topic-metadata">

**Author:** [@shwetha](https://discourse.processing.org/u/shwetha)\
**Replies:** 4\
**Last updated:** [May 26, 2021, 3:24pm UTC](https://discourse.processing.org/t/help-urgent-serial-number-generator/30313 "2021-05-26T15:24:55Z")

</div>

hi guys!!! i’m new to python and i have an assessment coming soon and i’m not sure how to generate serial numbers to show on the window. can someone help me please?

---

## [Issue with Gradient](https://discourse.processing.org/t/issue-with-gradient/30291)

<div class="topic-metadata">

**Author:** [@bridgette](https://discourse.processing.org/u/bridgette)\
**Replies:** 4\
**Last updated:** [May 26, 2021, 11:15am UTC](https://discourse.processing.org/t/issue-with-gradient/30291 "2021-05-26T11:15:09Z")

</div>

Hello, I’m trying to make a gradient, yet it just doesn’t seem to work my way. Could someone please let me know what is wrong with the code below? I can’t seem to fix it def setup(): size(550, 700) noSmooth() def …

---

## [Creating an empty Table object in Python mode (and some other hidden "data" classes)](https://discourse.processing.org/t/creating-an-empty-table-object-in-python-mode-and-some-other-hidden-data-classes/25121)

<div class="topic-metadata">

**Author:** [@villares](https://discourse.processing.org/u/villares)\
**Replies:** 3\
**Last updated:** [May 1, 2021, 11:38pm UTC](https://discourse.processing.org/t/creating-an-empty-table-object-in-python-mode-and-some-other-hidden-data-classes/25121 "2021-05-01T23:38:22Z")

</div>

Another documentation gap that drives me mad is that the Python equivalent of an example like the (Java) Table t = new Table() is missing. Table is missing from the Py.Processing.org/reference and nobody tells you how t…

---

## [Currency Converter : how to make a window with text and buttons?](https://discourse.processing.org/t/currency-converter-how-to-make-a-window-with-text-and-buttons/30256)

<div class="topic-metadata">

**Author:** [@bridgette](https://discourse.processing.org/u/bridgette)\
**Replies:** 7\
**Last updated:** [May 24, 2021, 9:57pm UTC](https://discourse.processing.org/t/currency-converter-how-to-make-a-window-with-text-and-buttons/30256 "2021-05-24T21:57:16Z")

</div>

Hi! I have to create a currency converter, without having to use any GUI libraries, so I wanted to create a window where all the text and button would be. I wanted to use def setup and def draw functions but I’m not sur…

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

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