MCPcopy Create free account
hub / github.com/arvidn/libtorrent / get_python

Function get_python

test/setup_transfer.cpp:698–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

696#endif
697
698std::vector<std::string> get_python()
699{
700 std::vector<std::string> ret;
701#ifdef _WIN32
702 char dummy[1];
703 DWORD const req_size = GetEnvironmentVariable("PYTHON_INTERPRETER", dummy, sizeof(dummy));
704 if (req_size > 1 && req_size < 4096)
705 {
706 std::vector<char> buf(req_size);
707 DWORD const sz = GetEnvironmentVariable("PYTHON_INTERPRETER", buf.data(), DWORD(buf.size()));
708 if (size_t(sz) == buf.size() - 1) ret.emplace_back(buf.data(), buf.size());
709 }
710#endif
711 ret.push_back("python3");
712 ret.push_back("python");
713 return ret;
714}
715
716int find_available_port()
717{

Callers 2

start_proxyFunction · 0.85
start_web_serverFunction · 0.85

Calls 4

emplace_backMethod · 0.80
push_backMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected