Executable Python programs on Linux and Mac

On Mac or Linux, we must mark our script as executable using the chmod command before the shebang will have any effect:

$ chmod +x words.py

Having done that, we can now run our script directly:

$ ./words.py http://sixty-north.com/c/t.txt
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset