Quantcast

Load lua and run from lua code

classic Classic list List threaded Threaded
4 messages Options
tobor tobor
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Load lua and run from lua code

Is it possible to load a lua file while running lua code and then run the file?
Something like the XMODEM recv at the prompt only while in lua to receive and then run the new lua code?


Bill



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Load lua and run from lua code



On Tue, Dec 10, 2013 at 10:09 PM, Bill <[hidden email]> wrote:
Is it possible to load a lua file while running lua code and then run the file?
Something like the XMODEM recv at the prompt only while in lua to receive and then run the new lua code?


Bill



_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Martin Guy Martin Guy
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Load lua and run from lua code

In reply to this post by tobor
On 10/12/2013, Bill <[hidden email]> wrote:
> Is it possible to load a lua file while running lua code and then run the
> file?
> Something like the XMODEM recv at the prompt only while in lua to receive
> and then run the new lua code?

If you specifically need to receive the code via xmodem you will also
need a Lua version of xmodem, such as
https://github.com/martinwguy/elua-tools/blob/master/recv.lua

    M
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
tobor tobor
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Load lua and run from lua code

I am actually going to load some lua from a file on a ftp site, should I just read the contents into an array and then use loadstring to execute it?


On Wed, Dec 11, 2013 at 7:45 AM, Martin Guy <[hidden email]> wrote:
On 10/12/2013, Bill <[hidden email]> wrote:
> Is it possible to load a lua file while running lua code and then run the
> file?
> Something like the XMODEM recv at the prompt only while in lua to receive
> and then run the new lua code?

If you specifically need to receive the code via xmodem you will also
need a Lua version of xmodem, such as
https://github.com/martinwguy/elua-tools/blob/master/recv.lua

    M
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Loading...