<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body ><div><br></div><div>I dont see the point of getting pd dir since we can run several instances of same bin with the shell.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><div style="font-size:100%">Patrice Colet </div></div> <br><br><br>-------- Message d'origine --------<br>De : Jonathan Wilkes <jancsika@yahoo.com> <br>Date : 30/07/2013 19:43 (GMT+00:00) <br>A : pd-list@iem.at <br>Objet : Re: [PD] get dir of current pd <br> <br><br>On 07/30/2013 07:48 AM, yvan volochine wrote:<br>> On 30/07/13 08:41, Jonathan Wilkes wrote:<br>>> Ok, I figured out how to do this<br>><br>> and how do you do?<br><br>In GNU/Linux on some _distros_ you can check the symlink<br>/proc/self/exe<br><br>If you do a readink from within C in Pd you'll get the absolute<br>path and name of the executable.<br><br>However, if you use the command "readlink" to [shell] I imagine<br>the readlink binary will look in the mirror and give you its own<br>name back.<br><br>I don't think /proc/self/exe is a requirement of all Linux flavors,<br>and I don't know what the BSD OSes do, or OSX. So I'm reluctant<br>to add this to [pdinfo].<br><br>Windows has its own function accessible from C to return the full<br>path and name of the executable.<br><br>-Jonathan<br><br>><br>> y<br>><br><br><br>_______________________________________________<br>Pd-list@iem.at mailing list<br>UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list<br></body>