[Tutor] setup.py "script" vs "console_scripts" Was: if __name__=='main' vs entry points: What to teach new comers?

Ben Finney ben+python at benfinney.id.au
Thu Aug 3 20:50:31 EDT 2017


Thomas Güttler <guettliml at thomas-guettler.de> writes:

> Why are there two ways: "script" vs "console_scripts entry-point"?

Because Distutils implements only ‘scripts’, and that's not capable
enough for what people need so Setuptools implements entry points.

In other words: One of them is in the standard library and does
something; the other is third-party and can do more.

That answers why there are two. But maybe you wanted to ask some
underlying question?

-- 
 \           “It ain't so much the things we don't know that get us in |
  `\    trouble. It's the things we know that ain't so.” —Artemus Ward |
_o__)                                     (1834–1867), U.S. journalist |
Ben Finney



More information about the Tutor mailing list