Python and Max

acmusic's icon

I want to start using Python with Max. How can I create a simple patcher where Python and Max communicate together using OSC?
Something like a list of integers in Python that prints in Max.

TFL's icon

In one end you can search how to send OSC messages from python and find some existing libraries like this one (nothing specific to Max here). In another end you can check how to receive OSC messages in Max (check [udpreceive]).

As as side note, in case you don't know about them, there are a bunch of externals allowing to execute Python code directly from inside a Max patch.