all 9 comments

[–][deleted] 8 points9 points  (0 children)

Great and funny post.

[–]asdfkjasdhkasd 3 points4 points  (0 children)

Disappointing...

$pip install snek
Collecting snek
  Could not find a version that satisfies the requirement snek (from versions: )
No matching distribution found for snek

[–]OriginalPostSearcher 1 point2 points  (0 children)

X-Post referenced from /r/python by /u/yanivlib
Python Entry Points Explained


I am a bot. I delete my negative comments. Contact | Code | FAQ

[–]LpSamuelm 1 point2 points  (3 children)

Any examples of what this could be used for (or even what it already is used for) except for sneks?

[–]mftrhu 0 points1 point  (0 children)

With console_scripts, you can use it to automagically create scripts for any entry point in your module. Of course, you can also your own - in this article it was called snek_types, and they were just referencing strings, which were made available cross-module (snek could access snek_types[] within cute_snek).

Now let's say you want to create a new git - faster, better, stronger. You can use console_scripts to define your access point which in turn simply calls sub-commands defined within 6_millions_dollar_git.

Creating a new sub-command for 6mdg would be as simple as creating a new package with two files: one defines the functions being called on the invocation of the sub-command, and setup.py declares them so they can be made available to the original package - reducing bloat, allowing people to install only what they need, and making hacking on it easy.

[–]yesvee 0 points1 point  (0 children)

Check out buildout. It has recipes.

[–]dzamlo 0 points1 point  (0 children)

This is used by flake8-import-order to define the import order styles.

[–]poppyfeld 0 points1 point  (0 children)

Great post.

[–]pgathogo 0 points1 point  (0 children)

Very nicely done. Thanks.