[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Is there a similar way to do if __name__ == '__main__' as in python ?
- From: gary ng <garyng2000@...>
- Date: Wed, 7 Feb 2007 20:35:43 -0800 (PST)
I want to write lua modules and put some self testing
code at the end of the script which got executed only
if it is run as its own and not through "require".
In python, this is usually done through
if __name__ = "__main__":
How should I do it in lua ?
regards,
gary
____________________________________________________________________________________
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html