Tips for porting Processing Java code to Python mode :)

I had some students asking me about examples in Java mode, how to use them, and I really enjoy porting stuff into Python mode, so I wrote this, trying to collect some tips:

Feedback is welcome :smiley:
Maybe you have a favorite tip to share?


Thanks for sharing, @villares!

* The bold (**) and inline code (`) formatting haven’t applied properly in some places.


Thanks! I’ll revise it as I add stuff, I hope :slight_smile:

What a wonderful resource! Thank you for sharing this.

1 Like

Good stuff. I might add something about try catch. And perhaps on python side list comprehension.

There was a problem with escape characters in

A table with some equivalences for conversion

a \|\| b (logical or )

1 Like


I fixed the escaping “| |” issue (it renders differently on the GitHub repo and on the GitHub Pages page…).

Could you write something about the try ... catch ?

yeah, list comprehension is a thing (there are two examples now using it… could be better)!

Yeah, I can do that. And as a bonus I’ll write something about String.format(). has it and Java.lang version is almost identical


That would be wonderful! I like .format() very much!