From 5d52919c54878ff584dc377bd995f58ff371b57c Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Thu, 11 Jun 2020 14:07:58 -0700 Subject: [PATCH 1/1] Amir Rachum's entry_points example from https://amir.rachum.com/blog/2017/07/28/python-entry-points/ --- setup.py | 10 ++++++++++ snek.py | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 setup.py create mode 100644 snek.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..996b5aa --- /dev/null +++ b/setup.py @@ -0,0 +1,10 @@ +from setuptools import setup + +setup( + name='snek', + entry_points={ + 'console_scripts': [ + 'snek = snek:main', + ], + } +) diff --git a/snek.py b/snek.py new file mode 100644 index 0000000..36ce8ee --- /dev/null +++ b/snek.py @@ -0,0 +1,13 @@ +ascii_snek = """\ + --..,_ _,.--. + `'.'. .'`__ o `;__. + '.'. .'.'` '---'` ` + '.`'--....--'`.' + `'--....--'` +""" + +def main(): + print(ascii_snek) + +if __name__ == '__main__': + main() -- 2.44.1