Quantcast
Channel: Should I put #! (shebang) in Python scripts, and what form should it take? - Stack Overflow
Viewing all articles
Browse latest Browse all 17

Answer by frp farhan for Should I put #! (shebang) in Python scripts, and what form should it take?

$
0
0

Use first

which python

This will give the output as the location where my python interpreter (binary) is present.

This output could be any such as

/usr/bin/python

or

/bin/python

Now appropriately select the shebang line and use it.

To generalize we can use:

#!/usr/bin/env

or

#!/bin/env

Viewing all articles
Browse latest Browse all 17

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>