3 # Fix Python script(s) to reference the interpreter via /usr/bin/env python.
11 for file in sys
.argv
[1:]:
15 print file, ': can\'t open for update'
18 if regex
.match('^#! */usr/local/bin/python', line
) < 0:
19 print file, ': not a /usr/local/bin/python script'
23 line
= regsub
.sub('/usr/local/bin/python',
24 '/usr/bin/env python', line
)
25 print file, ':', `line`