[Tutor] if __name__=='main' vs entry points: What to teach new comers?

Thomas Güttler guettliml at thomas-guettler.de
Tue Aug 1 10:54:40 EDT 2017


I have a friend who is a talented shell script writer. He is a linux guru since
several years.

He asked me if "if __name__=='main':" is state of the art if you want
to translate a shell script to python.

I started to stutter and did not know how to reply.

I use Python since several years and I use console_script in entry_points of setup.py.

I am very unsure if this is the right way if you want to teach a new comers the joy of python.

In the current context we want to translate a bunch of shell scripts to python scripts.

What do you think?

Regards,
   Thomas Güttler


-- 
Thomas Guettler http://www.thomas-guettler.de/


More information about the Tutor mailing list