# Python mode "immediate" processing?

**URL:** <https://discourse.processing.org/t/python-mode-immediate-processing/40504>\
**Category:** Processing.py\
**Created:** [January 7, 2023, 11:55pm UTC](https://discourse.processing.org/t/python-mode-immediate-processing/40504 "2023-01-07T23:55:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![SailorMike](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sailormike/32/17857_2.png) [@SailorMike](https://discourse.processing.org/u/SailorMike)\
**Post date:** [January 7, 2023, 11:55pm UTC](https://discourse.processing.org/t/python-mode-immediate-processing/40504/1 "2023-01-07T23:55:53Z")

</div>

I’m trying to learn Processing from “Math Adventures with Python” . The author shows a function that returns a number running from a command line (\>\>\>). How does one access a command environment line from Processing?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 8, 2023, 1:09am UTC](https://discourse.processing.org/t/python-mode-immediate-processing/40504/2 "2023-01-08T01:09:24Z")

</div>

> [@SailorMike](#):
>
> How does one access a command environment line from Processing?

Processing has a console area at the bottom of its IDE which we can `print` to it, but no direct typing.

Instead we type in our code text on the PDE’s window area.

Use command `print` in order to output the result of an expression onto the bottom console area.

As an example, running the following Python Mode code below:

```auto
print 23 + 56 - 4
print 3 ** 5
print PI, TAU

exit()

```

will output these values onto the console area:  
75  
243  
3.14159274101 6.28318548203

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [January 8, 2023, 1:21am UTC](https://discourse.processing.org/t/python-mode-immediate-processing/40504/3 "2023-01-08T01:21:31Z")

</div>

To complement what GoToLoop mentioned (the Processing Python mode inside of the Processing IDE has no “interactive console”, you may see it called REPL sometimes).

You might want to try other Python environments to get the immediate feedback… but it can’t be done in Processing Python mode.

---

<div class="post-metadata">

**Author:** ![SailorMike](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sailormike/32/17857_2.png) [@SailorMike](https://discourse.processing.org/u/SailorMike)\
**Post date:** [January 8, 2023, 2:43am UTC](https://discourse.processing.org/t/python-mode-immediate-processing/40504/4 "2023-01-08T02:43:37Z")

</div>

Thanks guys, I suspected as much. I think the author was running  
the code in python from the command window.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 8, 2023, 2:45am UTC](https://discourse.processing.org/t/python-mode-immediate-processing/40504/5 "2023-01-08T02:45:58Z")

</div>

Se vc ver algo tipo: \>\>\> 10 + 20  
No Python Mode vc converte para: `print 10 + 20`

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [January 8, 2023, 2:58am UTC](https://discourse.processing.org/t/python-mode-immediate-processing/40504/6 "2023-01-08T02:58:20Z")

</div>

There is a REPL mode in the Processing IDE; I have no idea how to use it.

 ![REPL](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/6/5/6598c0e67114667c92992a61574543d8af0e885a.png)

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 8, 2023, 3:07am UTC](https://discourse.processing.org/t/python-mode-immediate-processing/40504/7 "2023-01-08T03:07:02Z")

</div>

I believe REPL Mode is for Java syntax only.

For Python Mode you’re gonna need to rely on `print` statements.

Or install Python in your OS:

> **[Python Releases for Windows](https://www.python.org/downloads/windows/)**
>
> The official home of the Python Programming Language

---

<div class="post-metadata">

**Author:** ![SailorMike](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sailormike/32/17857_2.png) [@SailorMike](https://discourse.processing.org/u/SailorMike)\
**Post date:** [January 8, 2023, 3:53am UTC](https://discourse.processing.org/t/python-mode-immediate-processing/40504/8 "2023-01-08T03:53:11Z")

</div>

Yep, I have Python installed and can run it in my CMD window. I just wish the author had been more clear on how he did it, because  
I do like his book. It’s why I installed Processing.
