How to find a Python package's dependencies from pip._vendor import pkg_resources _package_name = 'zipline'_package = pkg_resources.working_set.by_key[_package_name] # retrieve dependencies from setup.pyfor requirement in _package.requires(): print(requirement) $ pip freeze $ pip list $ pip show pandas $ pip check pipdeptree $ pip install pipdeptree$ pipdeptree
참고 :C Structure Initialization #include #include #include #include struct x { INT32 a; INT32 b; INT32 c;}; int _tmain(INT32 argc, LPTSTR argv[]) { struct x x1 = {0}; _tprintf(_T("%d %d %d \n"), x1.a, x1.b, x1.c); struct x x2; memset(&x2, 0, sizeof(x2)); _tprintf(_T("%d %d %d \n"), x2.a, x2.b, x2.c); return EXIT_SUCCESS;} /* Output0 0 00 0 0*/
#include #include #include #include int _tmain(INT32 argc, LPTSTR argv[]){ // MAX_PATH : The maximum character length of a path. TCHAR currentDirectory[MAX_PATH]; TCHAR windowsDirectory[MAX_PATH]; TCHAR systemDirectory[MAX_PATH]; // GetCurrentDirectory GetWindowsDirectory GetSystemDirectory // If the function fails, the return value is zero. DWORD result1 = GetCurrentDirectory(MAX_PATH, currentD..
참고 :[Python] platform - Access to underlying platform's identifying data >>> import platform >>> platform.architecture() ('64bit', 'WindowsPE') >>> platform.machine() 'AMD64' >>> platform.platform() 'Windows-10-10.0.17134-SP0' >>> platform.system() 'Windows' >>> platform.version() '10.0.17134' >>> platform.release() '10'
참고 :IsWow64Process functionSYSTEM_INFO structureGetSystemInfo functionGetNativeSystemInfo function // C++ #include #include #include #include using namespace std; int _tmain(int argc, TCHAR *argv[]){ BOOL isWow64 = false; if (IsWow64Process(GetCurrentProcess(), &isWow64) != 0) cout
// C++ #include #include #include // for CString using namespace std; int _tmain(int argc, TCHAR *argv[]){ CString myArchitecture; if (myArchitecture.GetEnvironmentVariable(_T("PROCESSOR_ARCHITECTURE")) != 0) cout
// C++ #include #include #include #include using namespace std; int _tmain(int argc, TCHAR *argv[]){ const DWORD buffSize = 10; LPTSTR buffer1 = new TCHAR[buffSize]; LPTSTR buffer2 = new TCHAR[buffSize]; if (GetEnvironmentVariable(TEXT("PROCESSOR_ARCHITECTURE"), buffer1, buffSize) != 0) cout
// C++ // VC : suppress error messages about obsolete & deprecated functions#define _CRT_SECURE_NO_WARNINGS #include #include using namespace std; int main(int argc, char *argv[]){ if (const char *myArchitecture = getenv("PROCESSOR_ARCHITECTURE")) cout
// C# using System; namespace Sharp1{ class Program { static void Main(string[] args) { string myArchitecture = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE", EnvironmentVariableTarget.Machine); if (myArchitecture != null) Console.WriteLine("PROCESSOR_ARCHITECTURE : " + myArchitecture); string myArchiteW6432 = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432", Environment..
// C# : Not Good Solution using System;using System.IO; namespace Sharp1{ class Program { static void Main(string[] args) { string myArchitecture = Directory.Exists(@"C:\Program Files (x86)") ? "AMD64" : "x86"; Console.WriteLine(myArchitecture); } }}