Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 467d723

Browse files
committed
Added a comment explaining why this file must really have #!
/usr/local/bin/python and not #! /usr/bin/env python.
1 parent 5c4d5bf commit 467d723

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Lib/cgi.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
#! /usr/local/bin/python
22

3+
# NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is
4+
# intentionally NOT "/usr/bin/env python". On many systems
5+
# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
6+
# scripts, and /usr/local/bin is the default directory where Python is
7+
# installed, so /usr/bin/env would be unable to find python. Granted,
8+
# binary installations by Linux vendors often install Python in
9+
# /usr/bin. So let those vendors patch cgi.py to match their choice
10+
# of installation.
11+
312
"""Support module for CGI (Common Gateway Interface) scripts.
413
514
This module defines a number of utilities for use by CGI scripts

0 commit comments

Comments
 (0)