Hallo,
Mike McGonagle hat gesagt: // Mike McGonagle wrote:As a workaround for now you could modify the Lua search path manually
> On 5/19/08, Claude Heiland-Allen <claudiusmaximus@goto10.org> wrote:
> > Mike McGonagle wrote:
> > There is support for one-off execution of .lua scripts found via Pd's path
> > (relative to the object instance, not the original source file), use it like
> > self:dofile("myscript.lua").
>
> So, can I assume that this would effectively be the same as using
> "require"? I am sure there will be differences, but I am not trying to
> load a compiled binary, just curious if this has the same effect for
> .lua files...
using something like:
package.path = "/my/pdlua/files/?.lua;" .. package.path
before any requires. This adds the pattern "/my/pdlua/files/?.lua" to
the path require() searches for modules. Lua doesn't know about
directories, so you cannot us something like "pwd" instead here, of
course.
Do you think it would make sense to push the directory of a *.pd_lua
file to the front of package.path automatically? I guess I think it
would.
Ciao
--
Frank Barknecht _ ______footils.org__
_______________________________________________
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list