I have such a program to check methods of data from the command line:
me at me in ~/Desktop/Coding/codes $ cat check_methods.py #! /usr/bin/env python from sys import argv methods = dir(eval(argv[1])) methods = [i for i in methods if not i.startswith('_')] print(methods) me at me in ~/Desktop/Coding/codes $ python check_methods.py list ['append', 'clear', 'copy', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort'] me at me in ~/Desktop/Coding/codes $ python check_methods.py dict ['clear', 'copy', 'fromkeys', 'get', 'items', 'keys', 'pop', 'popitem', 'setdefault', 'update', 'values']
I'd like to run the program directly from bash, like:
$ check_methods.py list -bash: check_methods.py: command not found
How to achieve it ?