Skip to content

Instantly share code, notes, and snippets.

@jrabbit
Created September 21, 2010 20:10
Show Gist options
  • Select an option

  • Save jrabbit/590438 to your computer and use it in GitHub Desktop.

Select an option

Save jrabbit/590438 to your computer and use it in GitHub Desktop.
there are two PIPs
from subprocess import *
import sys
#pip = sys.argv[0]
def is_python():
pip = Popen(['pip', '--version'], stdout=PIPE).communicate()[0]
if pip[-12:].split() == "(python":
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment