(python_command, sysconfig_variable)
| 34 | trailing_whitespace_re = re.compile(r'^\s*(.*)\s*$') |
| 35 | |
| 36 | def queryPython(python_command, sysconfig_variable): |
| 37 | query_command = """ -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('%s')," """ |
| 38 | line = os.popen(python_command + query_command % sysconfig_variable).readline() |
| 39 | line = trailing_whitespace_re.sub(r'\1', line) |
| 40 | if not none_re.match(line): return line |
| 41 | else: return None |
| 42 | |
| 43 | def checkPython(python_command): |
| 44 | check_command = """ -c "print 'hello'," """ |