Skip to content Skip to sidebar Skip to footer

What Is The Significance Of " #!flask/bin/python " In Flask?

why this line #!flask/bin/python is added on the top of this code? from flask import Flask app = Flask(__name__) @app.route('/') def index(): return 'Hello, World!' if __nam

Solution 1:

#! is a shebang. On UNIX/UNIX like operating systems it basically tells your shell which executable (python in your case) to execute the script with. Without it, the shell is executing the script directly and since it does not understand Python code, it raises an error.


Post a Comment for "What Is The Significance Of " #!flask/bin/python " In Flask?"