<br><br><div class="gmail_quote">On Tue, May 20, 2008 at 1:18 AM, Frank Barknecht &lt;<a href="mailto:fbar@footils.org">fbar@footils.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hallo,<br>
<div class="Ih2E3d">Mike McGonagle hat gesagt: // Mike McGonagle wrote:<br>
<br>
&gt; On 5/19/08, Claude Heiland-Allen &lt;<a href="mailto:claudiusmaximus@goto10.org">claudiusmaximus@goto10.org</a>&gt; wrote:<br>
&gt; &gt; Mike McGonagle wrote:<br>
&gt; &gt; &nbsp;There is support for one-off execution of .lua scripts found via Pd&#39;s path<br>
&gt; &gt; (relative to the object instance, not the original source file), use it like<br>
&gt; &gt; self:dofile(&quot;myscript.lua&quot;).<br>
&gt;<br>
&gt; So, can I assume that this would effectively be the same as using<br>
&gt; &quot;require&quot;? I am sure there will be differences, but I am not trying to<br>
&gt; load a compiled binary, just curious if this has the same effect for<br>
&gt; .lua files...<br>
<br>
</div>As a workaround for now you could modify the Lua search path manually<br>
using something like:<br>
<br>
package.path = &quot;/my/pdlua/files/?.lua;&quot; .. package.path</blockquote><div><br></div><div>Cool, I will check it out...&nbsp;</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
before any requires. This adds the pattern &quot;/my/pdlua/files/?.lua&quot; to<br>
the path require() searches for modules. Lua doesn&#39;t know about<br>
directories, so you cannot us something like &quot;pwd&quot; instead here, of<br>
course.<br>
<br>
Do you think it would make sense to push the directory of a *.pd_lua<br>
file to the front of package.path automatically? I guess I think it<br>
would.</blockquote><div><br></div><div>Yes, I think that something like this would be taken care of by the &quot;environment&quot;, as this would force any and all code used in PD to be specific to PD, having to add code that is only used in PDLua. Also considering that PD allows you to load something from the same directory, then PDLua I would think should too. How is Vessel handling &#39;require&#39;?&nbsp;</div>
<div><br></div><div>Mike</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
Ciao<br>
<font color="#888888">--<br>
&nbsp;Frank Barknecht &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _ ______footils.org__<br>
<br>
_______________________________________________<br>
<a href="mailto:PD-list@iem.at">PD-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Peace may sound simple—one beautiful word— but it requires everything we have, every quality, every strength, every dream, every high ideal.<br>—Yehudi Menuhin (1916–1999), musician