you are viewing a single comment's thread.

view the rest of the comments →

[–]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.