Add files via upload
[PyWWW-Get.git] / pyverinfo.py
blobeae7461a8302aa8f7ddf0489f47d95f2f6675a8b
1 #!/usr/bin/python2
3 import re, os, sys, json, subprocess;
5 pyexecpath = os.path.realpath(sys.executable);
6 pkgsetuppy = os.path.realpath("."+os.path.sep+"setup.py");
7 pypkgenlistp = subprocess.Popen([pyexecpath, pkgsetuppy, "getversioninfo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE);
8 pypkgenout, pypkgenerr = pypkgenlistp.communicate();
9 if(sys.version[0]=="3"):
10 pypkgenout = pypkgenout.decode('utf-8');
11 pyconfiginfo = json.loads(pypkgenout);
12 print(pypkgenout);