Python Forum
Is the #! (shebang) line obsolete?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is the #! (shebang) line obsolete?
#5
newbieAuggie2019 Wrote:So if I use as a first line #!/usr/bin/env python3, will my program run on Windows, Mac and Linux, for instance?
In Linux and Mac, this line will invoke the env program which in that case will find the correct python3 executable in your environment and run it with your script as program argument. I'm unsure about what it does in Windows. It probably won't run out of the box.
Reply


Messages In This Thread
RE: Is the #! (shebang) line obsolete? - by nilamo - Oct-29-2019, 09:39 PM
RE: Is the #! (shebang) line obsolete? - by Gribouillis - Oct-29-2019, 10:20 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020