# Processing.py

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

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

**Page:** 5

---

## [\[SOLVED\] Py mode not working](https://discourse.processing.org/t/solved-py-mode-not-working/7483)

<div class="topic-metadata">

**Author:** [@Sky](https://discourse.processing.org/u/Sky)\
**Replies:** 9\
**Last updated:** [March 3, 2022, 1:48pm UTC](https://discourse.processing.org/t/solved-py-mode-not-working/7483 "2022-03-03T13:48:57Z")

</div>

SOLUTION: def setup(): size(500,500) def draw(): rect(100,100,100) Today I bought a notebook, where I installed Processing, Java projects work fine, but for python I run the code and it immediately stops

---

## [Have an event only happen for 1 frame](https://discourse.processing.org/t/have-an-event-only-happen-for-1-frame/35516)

<div class="topic-metadata">

**Author:** [@adora](https://discourse.processing.org/u/adora)\
**Replies:** 2\
**Last updated:** [March 2, 2022, 7:54am UTC](https://discourse.processing.org/t/have-an-event-only-happen-for-1-frame/35516 "2022-03-02T07:54:31Z")

</div>

Hi, so basically I want my code to be so that if my cursor is touching a circle, a score will be updated by one point only until the cursor leaves and touches the circle again. However, currently, a point keeps on being …

---

## [Python Sound Library](https://discourse.processing.org/t/python-sound-library/35034)

<div class="topic-metadata">

**Author:** [@The\_Math\_Maniac1](https://discourse.processing.org/u/The_Math_Maniac1)\
**Replies:** 6\
**Last updated:** [February 28, 2022, 9:10pm UTC](https://discourse.processing.org/t/python-sound-library/35034 "2022-02-28T21:10:43Z")

</div>

Hey, I am just starting to look into using sound in processing more seriously, and it seems that the best way is with the Processing Foundation Sound library. But I am running into an issue with it. I run my code, and it…

---

## [How to display video in PythonMode?](https://discourse.processing.org/t/how-to-display-video-in-pythonmode/485)

<div class="topic-metadata">

**Author:** [@newton45](https://discourse.processing.org/u/newton45)\
**Replies:** 12\
**Last updated:** [February 28, 2022, 9:09pm UTC](https://discourse.processing.org/t/how-to-display-video-in-pythonmode/485 "2022-02-28T21:09:20Z")

</div>

add\_library('video') def setup(): size(640, 360) background(0) movie = Movie(this, "transit.mov") movie.loop() def movieEvent(m): m.read() def draw(): image(movie, 0,0,width,height…

---

## [How to make a variable decrease then increase when it reaches a point](https://discourse.processing.org/t/how-to-make-a-variable-decrease-then-increase-when-it-reaches-a-point/35442)

<div class="topic-metadata">

**Author:** [@adora](https://discourse.processing.org/u/adora)\
**Replies:** 2\
**Last updated:** [February 25, 2022, 12:53pm UTC](https://discourse.processing.org/t/how-to-make-a-variable-decrease-then-increase-when-it-reaches-a-point/35442 "2022-02-25T12:53:22Z")

</div>

So I have my variable x and I want it to keep on decreasing until it reaches 10 and then start increasing to 50 then go back to 10 and keep on repeating (e.g. 12, 11, 10, 11, 12, 13, …, 49, 50, 49, 48, …, 11, 10). This …

---

## [Need some help with translate() and rotate()](https://discourse.processing.org/t/need-some-help-with-translate-and-rotate/35372)

<div class="topic-metadata">

**Author:** [@adora](https://discourse.processing.org/u/adora)\
**Replies:** 3\
**Last updated:** [February 22, 2022, 9:21pm UTC](https://discourse.processing.org/t/need-some-help-with-translate-and-rotate/35372 "2022-02-22T21:21:59Z")

</div>

Hi, so for my code, I want the heart shape to continuously rotate 360 degrees while keeping its position in the center of the screen. Currently, however, it rotates around the screen for some reason. How can I make it st…

---

## [Need some help with cursor interaction with objects](https://discourse.processing.org/t/need-some-help-with-cursor-interaction-with-objects/35357)

<div class="topic-metadata">

**Author:** [@adora](https://discourse.processing.org/u/adora)\
**Replies:** 2\
**Last updated:** [February 21, 2022, 4:33pm UTC](https://discourse.processing.org/t/need-some-help-with-cursor-interaction-with-objects/35357 "2022-02-21T16:33:12Z")

</div>

Basically, I want to code something where when the cursor hovers over a circle shape, another shape (the heart) will rotate smoothly and change colours until the circle changes position. The aim of it is for you to keep …

---

## [Windows application export failing in python mode](https://discourse.processing.org/t/windows-application-export-failing-in-python-mode/35341)

<div class="topic-metadata">

**Author:** [@The\_Math\_Maniac1](https://discourse.processing.org/u/The_Math_Maniac1)\
**Replies:** 0\
**Last updated:** [February 20, 2022, 5:17pm UTC](https://discourse.processing.org/t/windows-application-export-failing-in-python-mode/35341 "2022-02-20T17:17:09Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I am having an issue right now where I am attempting to export my sketch in python mode as a windows application, but processing is consistently…

---

## [Can't load library](https://discourse.processing.org/t/cant-load-library/23466)

<div class="topic-metadata">

**Author:** [@H1rono\_K](https://discourse.processing.org/u/H1rono_K)\
**Replies:** 7\
**Last updated:** [February 9, 2022, 5:11pm UTC](https://discourse.processing.org/t/cant-load-library/23466 "2022-02-09T17:11:53Z")

</div>

Hi! This is my first topic in this forum, and I’m not English native speaker. So it may be difficult for you to understand what the problem is. But please help me. I want to use Processing.py from command-line. Refer to…

---

## [Embed a py.processing sketch to the web for easy sharing?](https://discourse.processing.org/t/embed-a-py-processing-sketch-to-the-web-for-easy-sharing/19060)

<div class="topic-metadata">

**Author:** [@abouffard](https://discourse.processing.org/u/abouffard)\
**Replies:** 6\
**Last updated:** [February 8, 2022, 9:53pm UTC](https://discourse.processing.org/t/embed-a-py-processing-sketch-to-the-web-for-easy-sharing/19060 "2022-02-08T21:53:37Z")

</div>

Hello, it took me Covid confinement to eventually start developing the little hitch-hiking mini-game I had in mind! I turned to Processing to develop it quickly (involves a moving car with random color, and a pedestria…

---

## [How does input() work?](https://discourse.processing.org/t/how-does-input-work/34844)

<div class="topic-metadata">

**Author:** [@btbamfan1](https://discourse.processing.org/u/btbamfan1)\
**Replies:** 2\
**Last updated:** [January 26, 2022, 9:08pm UTC](https://discourse.processing.org/t/how-does-input-work/34844 "2022-01-26T21:08:49Z")

</div>

Hello everyone, when I use the input() function, then run it, where should I write my user input? Right now my code looks like this: \` def userInput(): whereToGo = input(“Where would you like to go?”) userInput() \` …

---

## [I'm not able to run any code on Processing Python mode](https://discourse.processing.org/t/im-not-able-to-run-any-code-on-processing-python-mode/34730)

<div class="topic-metadata">

**Author:** [@noL](https://discourse.processing.org/u/noL)\
**Replies:** 4\
**Last updated:** [January 26, 2022, 8:38pm UTC](https://discourse.processing.org/t/im-not-able-to-run-any-code-on-processing-python-mode/34730 "2022-01-26T20:38:56Z")

</div>

I just installed processing and I can’t run any code. Not even print(‘hello, world!’). This error keeps popping up in the console panel. I couldn’t find anybody else who had this issue, can someone please help? java.la…

---

## [Processing 3.5.4 Python mode save result as SVG](https://discourse.processing.org/t/processing-3-5-4-python-mode-save-result-as-svg/34850)

<div class="topic-metadata">

**Author:** [@edipii](https://discourse.processing.org/u/edipii)\
**Replies:** 2\
**Last updated:** [January 26, 2022, 8:35pm UTC](https://discourse.processing.org/t/processing-3-5-4-python-mode-save-result-as-svg/34850 "2022-01-26T20:35:38Z")

</div>

Hi, I have some code, and the result I need save to SVG, but after all, I get PNG image, but SVG not, maybe someone can tell me, where is the problem add\_library('svg') save\_frame = False w, h = 800, 800 length\_depr = …

---

## [Drawing background in setup function and changing renderer to P2D/P3D](https://discourse.processing.org/t/drawing-background-in-setup-function-and-changing-renderer-to-p2d-p3d/34637)

<div class="topic-metadata">

**Author:** [@Setsuna](https://discourse.processing.org/u/Setsuna)\
**Replies:** 6\
**Last updated:** [January 16, 2022, 4:09pm UTC](https://discourse.processing.org/t/drawing-background-in-setup-function-and-changing-renderer-to-p2d-p3d/34637 "2022-01-16T16:09:46Z")

</div>

Hello everyone, I use python mode and Processing 3.5.4. I would like to use the setup function to draw background elements once before animating in the draw function. However, have an issue when I choose the P2D or P3D…

---

## [Truchet tiles quarter circles](https://discourse.processing.org/t/truchet-tiles-quarter-circles/33786)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 7\
**Last updated:** [January 15, 2022, 10:23pm UTC](https://discourse.processing.org/t/truchet-tiles-quarter-circles/33786 "2022-01-15T22:23:54Z")

</div>

Hi there! I am trying to adapt a truchet tiles Code but I think that I have made a mess :sweat\_smile: I don’t undestand very well Range() in spite i have seen reference. Could you tell me what I have doing wrong, please…

---

## [Making a brick breaker in OOP](https://discourse.processing.org/t/making-a-brick-breaker-in-oop/34608)

<div class="topic-metadata">

**Author:** [@Antoine](https://discourse.processing.org/u/Antoine)\
**Replies:** 4\
**Last updated:** [January 13, 2022, 9:18pm UTC](https://discourse.processing.org/t/making-a-brick-breaker-in-oop/34608 "2022-01-13T21:18:17Z")

</div>

Can someone pls help me making my homework which is to do a brick breaker game in class (POO) in python. I have to do multiple levels and I cannot figure how to do that. This is what I have already done: For the game i…

---

## [Processing 3.5.4 not working with python mode](https://discourse.processing.org/t/processing-3-5-4-not-working-with-python-mode/25650)

<div class="topic-metadata">

**Author:** [@wunaizcy](https://discourse.processing.org/u/wunaizcy)\
**Replies:** 14\
**Last updated:** [December 12, 2021, 8:04pm UTC](https://discourse.processing.org/t/processing-3-5-4-not-working-with-python-mode/25650 "2021-12-12T20:04:23Z")

</div>

Hello, So after I googled online for a while I still can’t find the solution. I tried mostly everything I can find on the web. Reinstalling, firewall etc. My java mode works fine, just python mode is not.

---

## [The file"..." needs to be inside a sketch folder named "..."](https://discourse.processing.org/t/the-file-needs-to-be-inside-a-sketch-folder-named/25903)

<div class="topic-metadata">

**Author:** [@lafitte\_que](https://discourse.processing.org/u/lafitte_que)\
**Replies:** 10\
**Last updated:** [November 23, 2021, 6:12pm UTC](https://discourse.processing.org/t/the-file-needs-to-be-inside-a-sketch-folder-named/25903 "2021-11-23T18:12:49Z")

</div>

Hello, When using processing.py, I often have to open projects with multiple files inside a single folder. Every time I try opening the main file Processing wants to create a new folder even if the folder I am working w…

---

## [Different results in processing and interpreter](https://discourse.processing.org/t/different-results-in-processing-and-interpreter/33492)

<div class="topic-metadata">

**Author:** [@bobodoustaud](https://discourse.processing.org/u/bobodoustaud)\
**Replies:** 1\
**Last updated:** [November 16, 2021, 12:01am UTC](https://discourse.processing.org/t/different-results-in-processing-and-interpreter/33492 "2021-11-16T00:01:30Z")

</div>

Hello again! I encountered a rather strange thing in processing 3.5.4 : the code def rgbshv(x,y): col=\[y\>\>16&0xFF,y\>\>8&0xFF,y&0xFF\] #print(col) if x==0: if max(col)==min(col): return 0 …

---

## [Failed to install java.nio.charset.UnsupportedCharsetException](https://discourse.processing.org/t/failed-to-install-java-nio-charset-unsupportedcharsetexception/33291)

<div class="topic-metadata">

**Author:** [@Jim-Plaxco-Artsnova](https://discourse.processing.org/u/Jim-Plaxco-Artsnova)\
**Replies:** 8\
**Last updated:** [November 4, 2021, 12:16am UTC](https://discourse.processing.org/t/failed-to-install-java-nio-charset-unsupportedcharsetexception/33291 "2021-11-04T00:16:07Z")

</div>

Hi everyone, Just tried to run Processing in Python mode for the first time in Windows 7 and get the following error: Failed to install ‘’: java.nio.charset.UnsupportedCharsetException: cp0. Looking around it seems th…

---

## [ControlP5 Radio button event](https://discourse.processing.org/t/controlp5-radio-button-event/33081)

<div class="topic-metadata">

**Author:** [@MattC](https://discourse.processing.org/u/MattC)\
**Replies:** 2\
**Last updated:** [November 2, 2021, 11:27am UTC](https://discourse.processing.org/t/controlp5-radio-button-event/33081 "2021-11-02T11:27:55Z")

</div>

Hi All, I tried to make an sketch with some ControlP5 elements (knobs and radio buttons). Idea is to based on the selected radio button, change specific value with knob. This I got working. the harder part is when i …

---

## [Translate() causing problems with colors](https://discourse.processing.org/t/translate-causing-problems-with-colors/33155)

<div class="topic-metadata">

**Author:** [@LindowMan](https://discourse.processing.org/u/LindowMan)\
**Replies:** 2\
**Last updated:** [October 30, 2021, 2:26am UTC](https://discourse.processing.org/t/translate-causing-problems-with-colors/33155 "2021-10-30T02:26:10Z")

</div>

Hello! I am getting somewhat confused with what translate() is doing here. For context, I am writing a dithering algorithm that creates squares of size 16x16. It takes a value between 0 and 255 for brightness as input. …

---

## [Cannot see anything in console](https://discourse.processing.org/t/cannot-see-anything-in-console/33166)

<div class="topic-metadata">

**Author:** [@HeadRhino](https://discourse.processing.org/u/HeadRhino)\
**Replies:** 3\
**Last updated:** [October 30, 2021, 3:22am UTC](https://discourse.processing.org/t/cannot-see-anything-in-console/33166 "2021-10-30T03:22:21Z")

</div>

Using Tristan Bunn book - On step one - Hello World - But console is blank when I hit the play button - This also happens when I use the examples. I am using processing.org

---

## [Get color value for every pixel for making a mosaic](https://discourse.processing.org/t/get-color-value-for-every-pixel-for-making-a-mosaic/32907)

<div class="topic-metadata">

**Author:** [@LindowMan](https://discourse.processing.org/u/LindowMan)\
**Replies:** 4\
**Last updated:** [October 29, 2021, 9:22am UTC](https://discourse.processing.org/t/get-color-value-for-every-pixel-for-making-a-mosaic/32907 "2021-10-29T09:22:55Z")

</div>

Hi! Now I know this is very basic, and probably has been answered before, but I am running into issues with my project, and couldn’t find the answer I need. I want to create a program that allows me to load an image and…

---

## [How to declare floating numbers, assuming this is the problem](https://discourse.processing.org/t/how-to-declare-floating-numbers-assuming-this-is-the-problem/32690)

<div class="topic-metadata">

**Author:** [@proc8888](https://discourse.processing.org/u/proc8888)\
**Replies:** 5\
**Last updated:** [October 10, 2021, 1:42am UTC](https://discourse.processing.org/t/how-to-declare-floating-numbers-assuming-this-is-the-problem/32690 "2021-10-10T01:42:05Z")

</div>

I have errors with the following PyProcessing code below. The first error I get is TypeError: can’t multiply sequence by non-int of type ‘float’ on the line 'v\_lat=v\_lat\*0.0174533 ’ I think this is due to v\_lat bein…

---

## [Python mode n'est pas dans la liste des modes](https://discourse.processing.org/t/python-mode-nest-pas-dans-la-liste-des-modes/32480)

<div class="topic-metadata">

**Author:** [@Proooog](https://discourse.processing.org/u/Proooog)\
**Replies:** 2\
**Last updated:** [September 30, 2021, 7:05pm UTC](https://discourse.processing.org/t/python-mode-nest-pas-dans-la-liste-des-modes/32480 "2021-09-30T19:05:00Z")

</div>

Bonjour, Python mode n’apparait pas dans la liste des modes disponibles, J’ai également essayé de place le mode Python (trouvé sur ce forum) dans le fichier modes de processing, mais rien n’y fait. Je suis en versio…

---

## [How to repeat static drawing rotated four times by 90 degrees - python mode](https://discourse.processing.org/t/how-to-repeat-static-drawing-rotated-four-times-by-90-degrees-python-mode/32409)

<div class="topic-metadata">

**Author:** [@LeoP](https://discourse.processing.org/u/LeoP)\
**Replies:** 4\
**Last updated:** [September 28, 2021, 8:49pm UTC](https://discourse.processing.org/t/how-to-repeat-static-drawing-rotated-four-times-by-90-degrees-python-mode/32409 "2021-09-28T20:49:40Z")

</div>

Hi all, I am new to Processing and to python for that matter. I am interested in creating linear, geometric ‘art’, in the first instance without animation, static. I have managed to create a set of circles shifting inc…

---

## [I can not see the Python Mode - Processing 3.5.4](https://discourse.processing.org/t/i-can-not-see-the-python-mode-processing-3-5-4/32440)

<div class="topic-metadata">

**Author:** [@seym](https://discourse.processing.org/u/seym)\
**Replies:** 2\
**Last updated:** [September 28, 2021, 1:33pm UTC](https://discourse.processing.org/t/i-can-not-see-the-python-mode-processing-3-5-4/32440 "2021-09-28T13:33:06Z")

</div>

Should I do something else to see the Python Mode? Right now, it can not be seen as an option in the mode selection:

---

## [Error message when starting python mod](https://discourse.processing.org/t/error-message-when-starting-python-mod/26841)

<div class="topic-metadata">

**Author:** [@Bobby54](https://discourse.processing.org/u/Bobby54)\
**Replies:** 6\
**Last updated:** [September 16, 2021, 6:41am UTC](https://discourse.processing.org/t/error-message-when-starting-python-mod/26841 "2021-09-16T06:41:22Z")

</div>

When I start the python mode in processing I get following error statemant: I found a website that has a workaround for this issue. However I can’t seem to find pycodestyle.py. It is not in my Python 3.9 folder and…

---

## [PythonMode not working. (No display window?)](https://discourse.processing.org/t/pythonmode-not-working-no-display-window/32106)

<div class="topic-metadata">

**Author:** [@palmiye](https://discourse.processing.org/u/palmiye)\
**Replies:** 5\
**Last updated:** [September 16, 2021, 4:41am UTC](https://discourse.processing.org/t/pythonmode-not-working-no-display-window/32106 "2021-09-16T04:41:30Z")

</div>

Hello everybody, I’m having some big trouble with pythonmode. Run button seems like not working.(Not turning to green when I click on it.) And no display window is appearing. I’m just getting this warning on console, no…

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

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