[PD] python scripting in pd

Ronny Andersson ronny at andersson.tk
Tue Feb 16 21:11:07 CET 2010


Hi,

This is my first post on the list, so sorry for top-posting (or is
that the standard?) :)

I have been using PD+python on macos x. Here's what I did to get pd to
find the py module:

1) http://grrrr.org/ext/beta/macos/pd/py.pd_darwin
2) copy it to /Library/Pd/
3) in pd-extended, go to Preferences->Startup and add "py" to the list
4) create an object [py FILENAME METHOD] where FILENAME is your
pythonscript and METHOD is the python def(): that you want to access.

5) write your pythonscripts :)

I've so far only been sending numbers (ints and floats) in and out to
the python script. You might need to use [pack] to format your data
that you want to sent from pd to python and you might find a python
list [1, 2, 3] easiest to return from python to pd.

/Ronny


2010/2/16 Pagano, Patrick <pat at digitalworlds.ufl.edu>:
> I have had very limited success with python and pd
> i tried the pynetutils and had some luck with that
> but i was testing on windows
>
>
>
> ________________________________________
> From: pd-list-bounces at iem.at [pd-list-bounces at iem.at] On Behalf Of patrick mcnameeking [pmcnameeking at gmail.com]
> Sent: Tuesday, February 16, 2010 2:50 AM
> To: Pd-list at iem.at
> Subject: Re: [PD] python scripting in pd
>
> On Tue, Feb 16, 2010 at 12:32 AM, patrick mcnameeking <pmcnameeking at gmail.com<mailto:pmcnameeking at gmail.com>> wrote:
> Hey guys -
> I'm not entirely sure if this is the correct place for this question but here goes:
> I consider myself to be fairly proficient with pd and recently I have been getting excited about python through a computer science class at my university.  I was especially excited to learn that it is possible to use python to script objects in pd using py/pyext and purity.  I've become quite frustrated, however because i haven't been able to figure out how to get these libraries/modules to work.  I'm running OSX leopard with a highly customized version of pd-extended.
> Anybody have any ideas?
> Thanks,
> Pat
>
> Alright I'm feeling like a real n00b here but i've got another question:  I was trying to install the binaries for the older flext libraries and they are in .pd_darwin format.  It's not working on my version of pd so I was wondering if there is an easy workaround or if I am going to have to compile the source myself.  And if so, could someone give me a few pointers in that direction.  Like I said, working with code is a new thing to me and i'm stabbing around in the dark.
> Pat
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>




More information about the Pd-list mailing list