Oct-29-2019, 09:25 PM
Hi!
It looks like the Python language is advancing much much quicker than books on Python, so I find that although some sites explaining python are somewhat behind, a much bigger gap is normally found with books on python, to the point that there is usually a better way to do things in python than what you find in books.
I just saw on a book dealing with python 3, that you need to start a program with a #! (shebang) line which tells your computer that you want Python to execute this program. The shebang line begins with #!, but the rest depends on your operating system:
So, I'm using Python 3.7.4 on a computer running Windows 10, and it seems to me that with or without the shebang line, I have to proceed the same way to run a program, that is to say, I have to click 'Run Module' from the dropdown menu 'Run' on the IDLE environment.
That makes arise some questions:
1) What does the #! (shebang) line exactly do?
2) Is the #! (shebang) line obsolete?
All the best,
It looks like the Python language is advancing much much quicker than books on Python, so I find that although some sites explaining python are somewhat behind, a much bigger gap is normally found with books on python, to the point that there is usually a better way to do things in python than what you find in books.
I just saw on a book dealing with python 3, that you need to start a program with a #! (shebang) line which tells your computer that you want Python to execute this program. The shebang line begins with #!, but the rest depends on your operating system:
- On Windows, the shebang line is #! python3.
- On OS X, the shebang line is #! /usr/bin/env python3.
- On Linux, the shebang line is #! /usr/bin/python3.
So, I'm using Python 3.7.4 on a computer running Windows 10, and it seems to me that with or without the shebang line, I have to proceed the same way to run a program, that is to say, I have to click 'Run Module' from the dropdown menu 'Run' on the IDLE environment.
That makes arise some questions:
1) What does the #! (shebang) line exactly do?
2) Is the #! (shebang) line obsolete?
All the best,