From: Guido van Rossum Date: Mon, 20 Oct 1997 23:48:01 +0000 (+0000) Subject: Remove "." or "" from front of sys.path (this bit me once). X-Git-Tag: v1.5b1~175 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9476a78c1e310ecea0ceb953e36ec7e2d8f67856;p=thirdparty%2FPython%2Fcpython.git Remove "." or "" from front of sys.path (this bit me once). --- diff --git a/Tools/scripts/which.py b/Tools/scripts/which.py index 0aff2cd18746..a05d91998a58 100755 --- a/Tools/scripts/which.py +++ b/Tools/scripts/which.py @@ -4,6 +4,9 @@ # On stderr, near and total misses are reported. # '-l' argument adds ls -l of each file found. +import sys +if sys.path[0] in (".", ""): del sys.path[0] + import sys, os, string from stat import *