![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on equivalent of python's exec() in lua? within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Hey all, Just wondering, what is the equivalent of python's exec() function in lua? Here's an example of the syntax- ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
Hey all,
Just wondering, what is the equivalent of python's exec() function in lua? Here's an example of the syntax- Code:
a="pri" b="nt 12345" exec(a+b) Code:
12345 anyway, thanks for any help. spykr |
|
|
|
|
|
|
#2 |
![]() ![]() Developer
|
Not 100% sure is one exists but what you can do as a work around is write the string to a file and use Lua's dofile( "filename" ) to execute it.
__________________
[Blog] [Portfolio] [Homebrew Illuminati - Serious Homebrew Development Forums] [I want to make Homebrew FAQ] [How I broke into the Games Industry] [Programming Book List] [Programming Article List] |
|
|
|
|
|
#3 |
![]() ![]() Muppet Magnet
|
A little googling on "lua dofile" turns up this page, which does a decent job of explaining 'loadstring', which may well be what you're looking for.
__________________
Using firmware v2.00-v3.50? Open up a whole world of homebrew here
The PSP Homebrew Database needs YOU! Your ISP may be illegally wiretapping all your web activity. Stop Phorm Now! Visiting the Edinburgh Festivals? Get practical advice from experts. |
|
|
|
![]() |
| Tags |
| equivalent , exec , lua , python |
| Thread Tools | |
|
|