Advertisement
sanfx

paths

Jan 18th, 2014
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. #! /usr/bin/env python
  2.  
  3. import os
  4.  
  5. txt = "in " if os.getcwd() in os.getenv('PATH').split(":") else "not in"
  6.  
  7. print "Current path '%s'\nis %s list of 'PATH' environment variable below\n%s"  % (
  8.     os.getcwd(),
  9.     txt,
  10.     "\n".join(os.getenv('PATH').split(":"))
  11.     )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement