Given a program 'foo' that takes a command line argument '-I
includefile', I want to be able to look for 'includefile' in a path
specified in an environment variable, 'FOOPATH'.

I'd like a semantic that says:

  "If 'includefile' contains one or more path separator characters,
   ignore 'FOOPATH'. If it contains no path separators, look for it in
   the paths specified by 'FOOPATH', beginning with the leftmost path
   first."

Is there a standard Pythonic idiom for doing this or do I need to cook
up my own.


TIA,
-- 
----------------------------------------------------------------------------
Tim Daneliuk     tun...@tundraware.com
PGP Key:         http://www.tundraware.com/PGP/

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to