Faulkner:
> http://home.comcast.net/~faulkner612/programming/python/mainer.py
It's a bit of magic, I'll test it more, but it seems to work binding
the main() with Psyco too.
I have changed it a little (removed argv passed to the main and the
import of type, etc).
I don't know if/when I'll use it,
http://home.comcast.net/~faulkner612/programming/python/mainer.py
turns
if __name__ == '__main__': sys.exit(main(sys.argv))
into
import mainer
[EMAIL PROTECTED] wrote:
> I don't like much the syntax of:
> if __name__ == '__main__':
>
> Some time ago I have read this PEP:
> http://www.python.org/de
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I don't like much the syntax of:
> if __name__ == '__main__':
>
> Some time ago I have read this PEP:
> http://www.python.org/dev/peps/pep-0299/
>
> And why it was refused:
> http://mail.python.org/pipermail/python-dev/2006-March/062955
I don't like much the syntax of:
if __name__ == '__main__':
Some time ago I have read this PEP:
http://www.python.org/dev/peps/pep-0299/
And why it was refused:
http://mail.python.org/pipermail/python-dev/2006-March/062955.html
I think the name of the standard main function may be just main(), s