# Processing.py

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

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

**Page:** 11

---

## [\[Beginner\] Application of Lists (Part 2)](https://discourse.processing.org/t/beginner-application-of-lists-part-2/18965)

<div class="topic-metadata">

**Author:** [@macedorrn](https://discourse.processing.org/u/macedorrn)\
**Replies:** 8\
**Last updated:** [March 25, 2020, 8:55am UTC](https://discourse.processing.org/t/beginner-application-of-lists-part-2/18965 "2020-03-25T08:55:20Z")

</div>

I’m having a tough time trying to create a game that involves conditionals, loops and lists together. The instructions are relatively long and I don’t know if I’m allowed to post it here for a better explanation. In a nu…

---

## [Processing? What is it?](https://discourse.processing.org/t/processing-what-is-it/18937)

<div class="topic-metadata">

**Author:** [@portis](https://discourse.processing.org/u/portis)\
**Replies:** 6\
**Last updated:** [March 25, 2020, 12:31am UTC](https://discourse.processing.org/t/processing-what-is-it/18937 "2020-03-25T00:31:55Z")

</div>

What is “processing”? Do I need it? Can i use any IDE?

---

## [\[Beginner\] Application of Lists](https://discourse.processing.org/t/beginner-application-of-lists/18941)

<div class="topic-metadata">

**Author:** [@macedorrn](https://discourse.processing.org/u/macedorrn)\
**Replies:** 5\
**Last updated:** [March 24, 2020, 1:26am UTC](https://discourse.processing.org/t/beginner-application-of-lists/18941 "2020-03-24T01:26:08Z")

</div>

So, I am trying to write a program that draws white circles at mouseX, mouseY coordinates. When I press “p”, each circle is supposed to be randomly colored individually. When I click the mouse again, more white circles a…

---

## [Libraries and Tabs Issue](https://discourse.processing.org/t/libraries-and-tabs-issue/18670)

<div class="topic-metadata">

**Author:** [@atowersm](https://discourse.processing.org/u/atowersm)\
**Replies:** 6\
**Last updated:** [March 15, 2020, 8:18am UTC](https://discourse.processing.org/t/libraries-and-tabs-issue/18670 "2020-03-15T08:18:29Z")

</div>

Hi, I’m pretty new to processing and I’ve been learning the .py version for a class. I decided to recreate one of the example codes from the box2d\_processing library but in python instead of Java. I was able to do so and…

---

## [Issues with smooth 2D movement in python](https://discourse.processing.org/t/issues-with-smooth-2d-movement-in-python/18556)

<div class="topic-metadata">

**Author:** [@webbm1](https://discourse.processing.org/u/webbm1)\
**Replies:** 4\
**Last updated:** [March 11, 2020, 3:15pm UTC](https://discourse.processing.org/t/issues-with-smooth-2d-movement-in-python/18556 "2020-03-11T15:15:58Z")

</div>

The objective I’m trying to reach is to make smooth, 2-D movement in processing’s python mode. I understand that python processing isn’t nearly as popular as Java, but I need to do it for a school project. I don’t know …

---

## [\[Beginner\] Conditional Branching issues](https://discourse.processing.org/t/beginner-conditional-branching-issues/18336)

<div class="topic-metadata">

**Author:** [@macedorrn](https://discourse.processing.org/u/macedorrn)\
**Replies:** 5\
**Last updated:** [March 4, 2020, 5:58am UTC](https://discourse.processing.org/t/beginner-conditional-branching-issues/18336 "2020-03-04T05:58:48Z")

</div>

So, I am having troubles with two things: keys being drawn on top of each other, and not sure how to write conditionals. I basically have to type numbers between 0 an 100, and based on the numbers it calculates the grade…

---

## [Trouble with changing pixel colors](https://discourse.processing.org/t/trouble-with-changing-pixel-colors/18361)

<div class="topic-metadata">

**Author:** [@cupofcalculus](https://discourse.processing.org/u/cupofcalculus)\
**Replies:** 1\
**Last updated:** [March 3, 2020, 7:22pm UTC](https://discourse.processing.org/t/trouble-with-changing-pixel-colors/18361 "2020-03-03T19:22:18Z")

</div>

I’m wanting to edit individual pixel values. Checking my code as I go, I tested to see if it would copy the top and bottom rows of pixels, and ignore everything else. But instead I got a copy of the entire picture. Wh…

---

## [Problems with translating player to center at screen](https://discourse.processing.org/t/problems-with-translating-player-to-center-at-screen/18230)

<div class="topic-metadata">

**Author:** [@joloporto](https://discourse.processing.org/u/joloporto)\
**Replies:** 2\
**Last updated:** [February 29, 2020, 9:36pm UTC](https://discourse.processing.org/t/problems-with-translating-player-to-center-at-screen/18230 "2020-02-29T21:36:23Z")

</div>

i am working on a program with the player translated to the center of screen and the background moving around the player. I have working collision detection- when the player hits any of the blocks on the screen, it stops…

---

## [Reinforcement learning java](https://discourse.processing.org/t/reinforcement-learning-java/18030)

<div class="topic-metadata">

**Author:** [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Replies:** 18\
**Last updated:** [February 29, 2020, 12:53am UTC](https://discourse.processing.org/t/reinforcement-learning-java/18030 "2020-02-29T00:53:20Z")

</div>

OK, I’m giving up on python. Even when I code it correct it gives me an error for no reason. So can someone point me to how to reinforcement learn in java?

---

## [How to contribute to processing.py](https://discourse.processing.org/t/how-to-contribute-to-processing-py/17885)

<div class="topic-metadata">

**Author:** [@parth1811](https://discourse.processing.org/u/parth1811)\
**Replies:** 2\
**Last updated:** [February 26, 2020, 6:50pm UTC](https://discourse.processing.org/t/how-to-contribute-to-processing-py/17885 "2020-02-26T18:50:12Z")

</div>

I wish to contribute to the project, I have successfully set up everything. But have a doubt, about Once you have made some changes in processing.py how can you load the development version on the PDE for testing? In mo…

---

## [Pyprocessing 3d collisions](https://discourse.processing.org/t/pyprocessing-3d-collisions/17842)

<div class="topic-metadata">

**Author:** [@commie630](https://discourse.processing.org/u/commie630)\
**Replies:** 2\
**Last updated:** [February 15, 2020, 11:11pm UTC](https://discourse.processing.org/t/pyprocessing-3d-collisions/17842 "2020-02-15T23:11:20Z")

</div>

I am nearly done with my pyprocessing 3d pong-esque game… I have ran into trouble with the paddle-ball collisions. Sometimes, the collisions are more accurate than others… from processing import \* from math import \* kD…

---

## [How to make a key to become a integer and use the key on keyPressed?](https://discourse.processing.org/t/how-to-make-a-key-to-become-a-integer-and-use-the-key-on-keypressed/17822)

<div class="topic-metadata">

**Author:** [@macedorrn](https://discourse.processing.org/u/macedorrn)\
**Replies:** 4\
**Last updated:** [February 15, 2020, 3:50pm UTC](https://discourse.processing.org/t/how-to-make-a-key-to-become-a-integer-and-use-the-key-on-keypressed/17822 "2020-02-15T15:50:11Z")

</div>

\[Python\] I am a beginner I’ve been having troubles trying to first convert the value of a key (any key 0-9) returning an integer value so I can use this value whenever I press the key. I am supposed to make a square in…

---

## [\[PYTHON\]Converting key pressed into integer value?](https://discourse.processing.org/t/python-converting-key-pressed-into-integer-value/17836)

<div class="topic-metadata">

**Author:** [@macedorrn](https://discourse.processing.org/u/macedorrn)\
**Replies:** 3\
**Last updated:** [February 15, 2020, 3:48pm UTC](https://discourse.processing.org/t/python-converting-key-pressed-into-integer-value/17836 "2020-02-15T15:48:57Z")

</div>

I am trying to convert the value of numeric keys into integers, but I don’t know how to proceed with this problem. I have tried many approaches. What am I doing wrong? I don’t have much knowledge related to programming. …

---

## [Processing vs Processing Py](https://discourse.processing.org/t/processing-vs-processing-py/17739)

<div class="topic-metadata">

**Author:** [@Jim-Plaxco-Artsnova](https://discourse.processing.org/u/Jim-Plaxco-Artsnova)\
**Replies:** 4\
**Last updated:** [February 13, 2020, 9:31pm UTC](https://discourse.processing.org/t/processing-vs-processing-py/17739 "2020-02-13T21:31:27Z")

</div>

Hello, I’ve been using Processing on and off for a number of years. I’ve also played around with P5 JS so I know what to expect from that platform. As it happens I am also a Python programmer though my Python programmi…

---

## [How to load an image in python?](https://discourse.processing.org/t/how-to-load-an-image-in-python/17710)

<div class="topic-metadata">

**Author:** [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Replies:** 4\
**Last updated:** [February 11, 2020, 11:37pm UTC](https://discourse.processing.org/t/how-to-load-an-image-in-python/17710 "2020-02-11T23:37:40Z")

</div>

Can anyone explain how to load an image in python. I looked at a few videos & they use like 5 lines of code or more just to get a single image. so if I do that for all my images that be tons of lines for just images.

---

## [Getting list of filenames in a folder](https://discourse.processing.org/t/getting-list-of-filenames-in-a-folder/17747)

<div class="topic-metadata">

**Author:** [@cupofcalculus](https://discourse.processing.org/u/cupofcalculus)\
**Replies:** 3\
**Last updated:** [February 11, 2020, 7:54pm UTC](https://discourse.processing.org/t/getting-list-of-filenames-in-a-folder/17747 "2020-02-11T19:54:11Z")

</div>

I’m trying to write the Python equivalent of Java’s: fileList = dataFile("").listFiles(); I’m not seeing a listFiles() in the Python reference. Am I missing it, or a work-around?

---

## [Help needed- asteroids collision detection](https://discourse.processing.org/t/help-needed-asteroids-collision-detection/17622)

<div class="topic-metadata">

**Author:** [@commie630](https://discourse.processing.org/u/commie630)\
**Replies:** 4\
**Last updated:** [February 8, 2020, 9:48pm UTC](https://discourse.processing.org/t/help-needed-asteroids-collision-detection/17622 "2020-02-08T21:48:10Z")

</div>

I am working on a school assignment where we are making “Asteroids” in processing.py My school uses a slightly modified version of processing.py: for example, mouseX is mouse.x. I need help with my collision detection w…

---

## [Change python version in python mode](https://discourse.processing.org/t/change-python-version-in-python-mode/17181)

<div class="topic-metadata">

**Author:** [@CodingIsLife](https://discourse.processing.org/u/CodingIsLife)\
**Replies:** 1\
**Last updated:** [January 19, 2020, 8:23pm UTC](https://discourse.processing.org/t/change-python-version-in-python-mode/17181 "2020-01-19T20:23:29Z")

</div>

I want to use python3.6 in the python mode if it is possible. Currently the version info is 2.7.1. My processing version is 3.5.3. Any suggestion on how to make the upgrade? Thanks in advance. I am using Ubuntu 18.04 …

---

## [I have trouble with to get a simple class to work](https://discourse.processing.org/t/i-have-trouble-with-to-get-a-simple-class-to-work/17079)

<div class="topic-metadata">

**Author:** [@EvilDuck](https://discourse.processing.org/u/EvilDuck)\
**Replies:** 2\
**Last updated:** [January 14, 2020, 10:13am UTC](https://discourse.processing.org/t/i-have-trouble-with-to-get-a-simple-class-to-work/17079 "2020-01-14T10:13:47Z")

</div>

I want to learn Python, but I simply can’t get this to work. its really strange … I have two small code snippets posted here, when they reside in the same tab it works!. But if I put the class into its own tab I get a N…

---

## [Python Processing; Pacman](https://discourse.processing.org/t/python-processing-pacman/17058)

<div class="topic-metadata">

**Author:** [@heyitsme](https://discourse.processing.org/u/heyitsme)\
**Replies:** 2\
**Last updated:** [January 13, 2020, 5:45am UTC](https://discourse.processing.org/t/python-processing-pacman/17058 "2020-01-13T05:45:52Z")

</div>

Hello! I am starting the first step of my Pacman game, but I am having a problem with the Pacman moving. It seems that I’ve done something to my code to keep adding new Pacmans when I press an arrow. I want to remove th…

---

## [Template - Import modules in pyde](https://discourse.processing.org/t/template-import-modules-in-pyde/16608)

<div class="topic-metadata">

**Author:** [@benwall](https://discourse.processing.org/u/benwall)\
**Replies:** 10\
**Last updated:** [January 11, 2020, 10:25am UTC](https://discourse.processing.org/t/template-import-modules-in-pyde/16608 "2020-01-11T10:25:21Z")

</div>

Hi, Here’s an import modules template I’ve been working on to work with Processing using any outside code editor. It allows users to launch the .pyde file with PDE, and simply clic the Play button to launch their sketc…

---

## [Inconsistent duration of draw() process](https://discourse.processing.org/t/inconsistent-duration-of-draw-process/16996)

<div class="topic-metadata">

**Author:** [@Yannick\_Da](https://discourse.processing.org/u/Yannick_Da)\
**Replies:** 4\
**Last updated:** [January 10, 2020, 11:11pm UTC](https://discourse.processing.org/t/inconsistent-duration-of-draw-process/16996 "2020-01-10T23:11:52Z")

</div>

Hi all, I work on a project where we aim at drawing shape based on csv reading. Code is working (basically, it opens csvfile then read data line by line and update size and color of an ellipse for each line). However, w…

---

## [Fail to update shape setup from csv data reading](https://discourse.processing.org/t/fail-to-update-shape-setup-from-csv-data-reading/16931)

<div class="topic-metadata">

**Author:** [@Yannick\_Da](https://discourse.processing.org/u/Yannick_Da)\
**Replies:** 2\
**Last updated:** [January 10, 2020, 10:55am UTC](https://discourse.processing.org/t/fail-to-update-shape-setup-from-csv-data-reading/16931 "2020-01-10T10:55:23Z")

</div>

Hi all Processing.org lovers out there, I’m working on a project were we would like to dynamically represent physiological data through artistic visual representation, with data being measured and streamed in real-time. …

---

## [How to use keras with processing.py](https://discourse.processing.org/t/how-to-use-keras-with-processing-py/16912)

<div class="topic-metadata">

**Author:** [@arpitjp](https://discourse.processing.org/u/arpitjp)\
**Replies:** 5\
**Last updated:** [January 6, 2020, 8:52pm UTC](https://discourse.processing.org/t/how-to-use-keras-with-processing-py/16912 "2020-01-06T20:52:51Z")

</div>

how to use keras with processing.py

---

## [Python Processing 3; Pacman Menu](https://discourse.processing.org/t/python-processing-3-pacman-menu/16824)

<div class="topic-metadata">

**Author:** [@heyitsme](https://discourse.processing.org/u/heyitsme)\
**Replies:** 2\
**Last updated:** [January 3, 2020, 4:27am UTC](https://discourse.processing.org/t/python-processing-3-pacman-menu/16824 "2020-01-03T04:27:10Z")

</div>

Hi! I am a beginner at python processing 3. I am currently making a Pacman game and I am having trouble making the menu. I would like to have the menu so that when the player clicks on the controls button, it will brin…

---

## [Python pls help :/](https://discourse.processing.org/t/python-pls-help/16783)

<div class="topic-metadata">

**Author:** [@Dominik\_rgn](https://discourse.processing.org/u/Dominik_rgn)\
**Replies:** 1\
**Last updated:** [January 1, 2020, 8:45pm UTC](https://discourse.processing.org/t/python-pls-help/16783 "2020-01-01T20:45:58Z")

</div>

I have a python question I have found a chat bot and would like to continue but it doesnt work because I cannot use the spacebar for the questions I write, can someone help me why this is not possible? import random zu…

---

## [Using PGraphics to create a mask](https://discourse.processing.org/t/using-pgraphics-to-create-a-mask/16740)

<div class="topic-metadata">

**Author:** [@hinomupi](https://discourse.processing.org/u/hinomupi)\
**Replies:** 4\
**Last updated:** [December 31, 2019, 12:47am UTC](https://discourse.processing.org/t/using-pgraphics-to-create-a-mask/16740 "2019-12-31T00:47:39Z")

</div>

So, I want to create a PGraphics object with some transparent regions and everything else black, but I can only find the regions that are transparent. Is there any way for me to do something like: Mask.createGraphics(wi…

---

## [How to run Processing Python Mode in Atom?](https://discourse.processing.org/t/how-to-run-processing-python-mode-in-atom/16225)

<div class="topic-metadata">

**Author:** [@BeastCoder](https://discourse.processing.org/u/BeastCoder)\
**Replies:** 6\
**Last updated:** [December 24, 2019, 3:24pm UTC](https://discourse.processing.org/t/how-to-run-processing-python-mode-in-atom/16225 "2019-12-24T15:24:43Z")

</div>

I have searched for five hours trying to find a good tutorial on how to use processing.py in atom. I’m finally creating this topic so that someone who does know how to do it can help anyone else that has this problem. Sp…

---

## [Processing.js but for Python?](https://discourse.processing.org/t/processing-js-but-for-python/16578)

<div class="topic-metadata">

**Author:** [@pfe1223](https://discourse.processing.org/u/pfe1223)\
**Replies:** 3\
**Last updated:** [December 23, 2019, 3:50pm UTC](https://discourse.processing.org/t/processing-js-but-for-python/16578 "2019-12-23T15:50:16Z")

</div>

Is there an equivalent for Processing.js but for Python? I am looking to write Processing code in Python but have the output run on the web. I am pretty sure that I can’t do this, but thought I’d ask here just in case.

---

## [Run python in Android?](https://discourse.processing.org/t/run-python-in-android/7166)

<div class="topic-metadata">

**Author:** [@manhnt](https://discourse.processing.org/u/manhnt)\
**Replies:** 2\
**Last updated:** [December 23, 2019, 11:20am UTC](https://discourse.processing.org/t/run-python-in-android/7166 "2019-12-23T11:20:27Z")

</div>

My question is that: Can I convert python code to Anndroid? I used to convert between Java mode and ANdroid mode. Is it the same with Python?

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

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