()
| 790 | |
| 791 | |
| 792 | def _get_machine_win32(): |
| 793 | # Try to use the PROCESSOR_* environment variables |
| 794 | # available on Win XP and later; see |
| 795 | # http://support.microsoft.com/kb/888731 and |
| 796 | # http://www.geocities.com/rick_lively/MANUALS/ENV/MSWIN/PROCESSI.HTM |
| 797 | |
| 798 | # WOW64 processes mask the native architecture |
| 799 | try: |
| 800 | [arch, *_] = _wmi_query('CPU', 'Architecture') |
| 801 | except OSError: |
| 802 | pass |
| 803 | else: |
| 804 | try: |
| 805 | arch = ['x86', 'MIPS', 'Alpha', 'PowerPC', None, |
| 806 | 'ARM', 'ia64', None, None, |
| 807 | 'AMD64', None, None, 'ARM64', |
| 808 | ][int(arch)] |
| 809 | except (ValueError, IndexError): |
| 810 | pass |
| 811 | else: |
| 812 | if arch: |
| 813 | return arch |
| 814 | return ( |
| 815 | os.environ.get('PROCESSOR_ARCHITEW6432', '') or |
| 816 | os.environ.get('PROCESSOR_ARCHITECTURE', '') |
| 817 | ) |
| 818 | |
| 819 | |
| 820 | class _Processor: |
no test coverage detected
searching dependent graphs…