On 4/28/07, <b class="gmail_sendername">Julian Fondren</b> <<a href="mailto:ayrnieu@gmail.com">ayrnieu@gmail.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 4/28/07, jm <<a href="mailto:jeffm@ghostgun.com">jeffm@ghostgun.com</a>> wrote:<br>> Harish Mallipeddi wrote:<br>> > Anyways I'm wondering if there's like a main() method in Erlang which<br>> > will run automatically? Currently from the examples I've been coming
<br>> > across in the book and online, you've to create a new module and then go<br>> > to the Erlang shell and do c('module_name') to compile/load the module.<br>> > Is there a way to just say "erl 
module.beam" and have it invoke some<br>> > method automatically much like how if __name__=="__main__" works in<br>> Python.<br>><br>> One last<br>> thought take a look at something like yaws to see how it's put together.
<br><br>(edited)<br><br>Yaws uses a shell script to figure out the arguments and then invoke<br>something more involved than: erl -s yaws init args</blockquote><div><br>Thanks all of you! escript was basically what I was looking for.  
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Anyway, <a href="http://wiki.trapexit.org/index.php/Hello_World">http://wiki.trapexit.org/index.php/Hello_World
</a> gives you<br>three ways to do this and also some "don't do that" propaganda.<br>Erlang is just much more interesting when you -don't- treat it<br>like Python.</blockquote><div><br> Point taken :)</div>
</div><br>-- <br>Harish Mallipeddi<br><a href="http://poundbang.in/">http://poundbang.in/</a>