[Novalug] Novalug Digest, Vol 65, Issue 88

Jamie Duncan jamie.e.duncan at gmail.com
Fri Mar 16 20:23:29 EDT 2012


Might be bending the rules a little, but a few lines of Python does
the same thing, and is infinitely easier to read:

[root at desktop01 ~]# ./ispath /usr/lib64/python2.6
True
[root at desktop01 ~]# ./ispath /home
False
[root at desktop01 ~]# cat ispath
#!/usr/bin/env python

import sys

if sys.argv[1] in sys.path:
	print "True"
else:
	print "False"


More information about the Novalug mailing list