MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / getVersion

Method getVersion

src/openms/source/SYSTEM/PythonInfo.cpp:88–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 }
87
88 String PythonInfo::getVersion(const String& python_executable)
89 {
90 String v;
91 QProcess qp;
92 qp.start(python_executable.toQString(), QStringList() << "--version", QIODevice::ReadOnly);
93 bool success = qp.waitForFinished();
94 if (success && qp.exitStatus() == QProcess::ExitStatus::NormalExit && qp.exitCode() == 0)
95 {
96 v = qp.readAllStandardOutput().toStdString(); // some pythons report is on stdout
97 v += qp.readAllStandardError().toStdString(); // ... some on stderr
98 v.trim(); // remove '\n'
99 }
100 return v;
101 }
102
103} // namespace OpenMS

Callers 15

update_Method · 0.45
outputToMethod · 0.45
outputTo_Method · 0.45
main_Method · 0.45
runMethod · 0.45
storeDataProcessing_Method · 0.45
writeSoftware_Method · 0.45
writeToMethod · 0.45
writeToMethod · 0.45
writeToMethod · 0.45

Calls 3

QStringListClass · 0.50
startMethod · 0.45
toQStringMethod · 0.45

Tested by 3

testDataProcessingFunction · 0.36
testSoftwareFunction · 0.36
testVersionFunction · 0.36