# Examples for 'Getting started with Processing.py' book

**URL:** <https://discourse.processing.org/t/examples-for-getting-started-with-processing-py-book/9530>\
**Category:** Processing.py\
**Created:** [March 22, 2019, 2:11pm UTC](https://discourse.processing.org/t/examples-for-getting-started-with-processing-py-book/9530 "2019-03-22T14:11:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![toffeln](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@toffeln](https://discourse.processing.org/u/toffeln)\
**Post date:** [March 22, 2019, 2:11pm UTC](https://discourse.processing.org/t/examples-for-getting-started-with-processing-py-book/9530/1 "2019-03-22T14:11:38Z")

</div>

Hi,

I’m new to programming and bought the book Getting started with processing.py. All code in the book works but when I open the examples they are coded for java. I’ve searched but can’t find the same examples for python mode.

Do they exist or do I have to manually type the code in or replace the commands that I know are different?

---

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [March 22, 2019, 2:58pm UTC](https://discourse.processing.org/t/examples-for-getting-started-with-processing-py-book/9530/2 "2019-03-22T14:58:20Z")

</div>

There are plenty of worked examples out there, I even created [some myself](https://github.com/monkstone/processing.py-examples), there is also a processing.py fork of the [Nature of Code Examples](https://github.com/nature-of-code/The-Nature-of-Code-Examples-Python). However you could learn a lot by translating the java code examples yourself.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [March 25, 2019, 6:06pm UTC](https://discourse.processing.org/t/examples-for-getting-started-with-processing-py-book/9530/3 "2019-03-25T18:06:00Z")

</div>

> [@toffeln](#):
>
> when I open the examples they are coded for java. I’ve searched but can’t find the same examples for python mode.

Open PDE, and then switch the blank sketch into Python Mode with the dropdown menu. Now when you open the Examples window you will find the Python examples. For example, the top folder with be “Advanced \> KeyCodes”.

You can also find these examples in your file system under

> Processing \> modes \> Python \> examples

If you have not yet installed Python Mode, do it with Contributions Manager and it will be available in the new blank sketch dropdown. You cannot switch an existing sketch between modes – only a blank sketch.

---

<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:** [March 25, 2019, 9:59pm UTC](https://discourse.processing.org/t/examples-for-getting-started-with-processing-py-book/9530/4 "2019-03-25T21:59:07Z")

</div>

> [@jeremydouglass](#):
>
> You cannot switch an existing sketch between modes – only a blank sketch.

Hit CTRL + N to open another “blank” sketch window. We can change between modes from there. 😉

P.S.: If we define custom sketch templates, a “blank” sketch window isn’t necessarily blank btW. 😛
