[PD] RE : Re: get dir of current pd

colet.patrice colet.patrice at free.fr
Tue Jul 30 22:44:20 CEST 2013


I dont see the point of getting pd dir since we can run several instances of same bin with the shell.




Patrice Colet 

-------- Message d'origine --------
De : Jonathan Wilkes <jancsika at yahoo.com> 
Date : 30/07/2013  19:43  (GMT+00:00) 
A : pd-list at iem.at 
Objet : Re: [PD] get dir of current pd 
 
On 07/30/2013 07:48 AM, yvan volochine wrote:
> On 30/07/13 08:41, Jonathan Wilkes wrote:
>> Ok, I figured out how to do this
>
> and how do you do?

In GNU/Linux on some _distros_ you can check the symlink
/proc/self/exe

If you do a readink from within C in Pd you'll get the absolute
path and name of the executable.

However, if you use the command "readlink" to [shell] I imagine
the readlink binary will look in the mirror and give you its own
name back.

I don't think /proc/self/exe is a requirement of all Linux flavors,
and I don't know what the BSD OSes do, or OSX.  So I'm reluctant
to add this to [pdinfo].

Windows has its own function accessible from C to return the full
path and name of the executable.

-Jonathan

>
> y
>


_______________________________________________
Pd-list at iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20130730/38bd0d0a/attachment.htm>


More information about the Pd-list mailing list