When I need classes?
Ulli Horlacher
framstag at rus.uni-stuttgart.de
Mon Jan 11 02:31:51 EST 2016
Cameron Simpson <cs at zip.com.au> wrote:
> I always structure this aspect as:
>
> ... at or near top of script ...
>
> def main(argv):
> ... do main logic here ...
>
> ... at bottom ...
> if __name__ == '__main__':
> sys.exit(main(sys.argv))
I, as a Python beginner, came to the same solution!
It seems, it was a good idea :-)
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum IZUS/TIK E-Mail: horlacher at tik.uni-stuttgart.de
Universitaet Stuttgart Tel: ++49-711-68565868
Allmandring 30a Fax: ++49-711-682357
70550 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/
More information about the Python-list
mailing list