summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola' <g.rodola@gmail.com>2013-12-11 13:27:04 -0800
committerGiampaolo Rodola' <g.rodola@gmail.com>2013-12-11 13:27:04 -0800
commit3c2eea19d6774b9dd94a61b86aea84f2a9ff8af4 (patch)
tree148fc2f529e2bcf252f1d604e9effbf7f9723e57
parente994e7e2eb19931d55061a02fc8d686abfbde196 (diff)
downloadpsutil-3c2eea19d6774b9dd94a61b86aea84f2a9ff8af4.tar.gz
rename windows modules by removing the 'ms' prefix in py, c, and h files
-rw-r--r--psutil/__init__.py16
-rw-r--r--psutil/_psutil_windows.c (renamed from psutil/_psutil_mswindows.c)30
-rw-r--r--psutil/_psutil_windows.h (renamed from psutil/_psutil_mswindows.h)0
-rw-r--r--psutil/_pswindows.py (renamed from psutil/_psmswindows.py)138
-rw-r--r--psutil/arch/windows/ntextapi.h (renamed from psutil/arch/mswindows/ntextapi.h)0
-rw-r--r--psutil/arch/windows/process_handles.c (renamed from psutil/arch/mswindows/process_handles.c)0
-rw-r--r--psutil/arch/windows/process_handles.h (renamed from psutil/arch/mswindows/process_handles.h)0
-rw-r--r--psutil/arch/windows/process_info.c (renamed from psutil/arch/mswindows/process_info.c)0
-rw-r--r--psutil/arch/windows/process_info.h (renamed from psutil/arch/mswindows/process_info.h)0
-rw-r--r--psutil/arch/windows/security.c (renamed from psutil/arch/mswindows/security.c)0
-rw-r--r--psutil/arch/windows/security.h (renamed from psutil/arch/mswindows/security.h)0
-rw-r--r--setup.py10
-rw-r--r--test/_windows.py10
13 files changed, 102 insertions, 102 deletions
diff --git a/psutil/__init__.py b/psutil/__init__.py
index d3de9125..76f3d89c 100644
--- a/psutil/__init__.py
+++ b/psutil/__init__.py
@@ -132,14 +132,14 @@ if sys.platform.startswith("linux"):
pass
elif sys.platform.startswith("win32"):
- import psutil._psmswindows as _psplatform
- from psutil._psmswindows import (ABOVE_NORMAL_PRIORITY_CLASS,
- BELOW_NORMAL_PRIORITY_CLASS,
- HIGH_PRIORITY_CLASS,
- IDLE_PRIORITY_CLASS,
- NORMAL_PRIORITY_CLASS,
- REALTIME_PRIORITY_CLASS,
- CONN_DELETE_TCB)
+ import psutil._pswindows as _psplatform
+ from psutil._pswindows import (ABOVE_NORMAL_PRIORITY_CLASS,
+ BELOW_NORMAL_PRIORITY_CLASS,
+ HIGH_PRIORITY_CLASS,
+ IDLE_PRIORITY_CLASS,
+ NORMAL_PRIORITY_CLASS,
+ REALTIME_PRIORITY_CLASS,
+ CONN_DELETE_TCB)
elif sys.platform.startswith("darwin"):
import psutil._psosx as _psplatform
diff --git a/psutil/_psutil_mswindows.c b/psutil/_psutil_windows.c
index 4310bf66..9bf6d505 100644
--- a/psutil/_psutil_mswindows.c
+++ b/psutil/_psutil_windows.c
@@ -3,7 +3,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
- * Windows platform-specific module methods for _psutil_mswindows
+ * Windows platform-specific module methods for _psutil_windows
*/
// Fixes clash between winsock2.h and windows.h
@@ -24,12 +24,12 @@
// Link with Iphlpapi.lib
#pragma comment(lib, "IPHLPAPI.lib")
-#include "_psutil_mswindows.h"
+#include "_psutil_windows.h"
#include "_psutil_common.h"
-#include "arch/mswindows/security.h"
-#include "arch/mswindows/process_info.h"
-#include "arch/mswindows/process_handles.h"
-#include "arch/mswindows/ntextapi.h"
+#include "arch/windows/security.h"
+#include "arch/windows/process_info.h"
+#include "arch/windows/process_handles.h"
+#include "arch/windows/ntextapi.h"
/*
@@ -3039,42 +3039,42 @@ static struct module_state _state;
#if PY_MAJOR_VERSION >= 3
-static int psutil_mswindows_traverse(PyObject *m, visitproc visit, void *arg) {
+static int psutil_windows_traverse(PyObject *m, visitproc visit, void *arg) {
Py_VISIT(GETSTATE(m)->error);
return 0;
}
-static int psutil_mswindows_clear(PyObject *m) {
+static int psutil_windows_clear(PyObject *m) {
Py_CLEAR(GETSTATE(m)->error);
return 0;
}
static struct PyModuleDef moduledef = {
PyModuleDef_HEAD_INIT,
- "psutil_mswindows",
+ "psutil_windows",
NULL,
sizeof(struct module_state),
PsutilMethods,
NULL,
- psutil_mswindows_traverse,
- psutil_mswindows_clear,
+ psutil_windows_traverse,
+ psutil_windows_clear,
NULL
};
#define INITERROR return NULL
-PyObject *PyInit__psutil_mswindows(void)
+PyObject *PyInit__psutil_windows(void)
#else
#define INITERROR return
-void init_psutil_mswindows(void)
+void init_psutil_windows(void)
#endif
{
struct module_state *st = NULL;
#if PY_MAJOR_VERSION >= 3
PyObject *module = PyModule_Create(&moduledef);
#else
- PyObject *module = Py_InitModule("_psutil_mswindows", PsutilMethods);
+ PyObject *module = Py_InitModule("_psutil_windows", PsutilMethods);
#endif
if (module == NULL) {
@@ -3132,7 +3132,7 @@ void init_psutil_mswindows(void)
module, "MIB_TCP_STATE_DELETE_TCB", MIB_TCP_STATE_DELETE_TCB);
PyModule_AddIntConstant(
module, "PSUTIL_CONN_NONE", PSUTIL_CONN_NONE);
- // ...for internal use in _psutil_mswindows.py
+ // ...for internal use in _psutil_windows.py
PyModule_AddIntConstant(
module, "INFINITE", INFINITE); PyModule_AddIntConstant(
module, "ERROR_ACCESS_DENIED", ERROR_ACCESS_DENIED); SetSeDebug();
diff --git a/psutil/_psutil_mswindows.h b/psutil/_psutil_windows.h
index 04a80375..04a80375 100644
--- a/psutil/_psutil_mswindows.h
+++ b/psutil/_psutil_windows.h
diff --git a/psutil/_psmswindows.py b/psutil/_pswindows.py
index 4a5d26e7..f7cb75c9 100644
--- a/psutil/_psmswindows.py
+++ b/psutil/_pswindows.py
@@ -10,22 +10,22 @@ import errno
import os
import sys
-import _psutil_mswindows
+import _psutil_windows
-from _psutil_mswindows import ERROR_ACCESS_DENIED
+from _psutil_windows import ERROR_ACCESS_DENIED
from psutil._common import *
from psutil._compat import PY3, xrange, wraps, lru_cache
from psutil._error import AccessDenied, NoSuchProcess, TimeoutExpired
# process priority constants:
# http://msdn.microsoft.com/en-us/library/ms686219(v=vs.85).aspx
-from _psutil_mswindows import (ABOVE_NORMAL_PRIORITY_CLASS,
- BELOW_NORMAL_PRIORITY_CLASS,
- HIGH_PRIORITY_CLASS,
- IDLE_PRIORITY_CLASS,
- NORMAL_PRIORITY_CLASS,
- REALTIME_PRIORITY_CLASS,
- INFINITE)
+from _psutil_windows import (ABOVE_NORMAL_PRIORITY_CLASS,
+ BELOW_NORMAL_PRIORITY_CLASS,
+ HIGH_PRIORITY_CLASS,
+ IDLE_PRIORITY_CLASS,
+ NORMAL_PRIORITY_CLASS,
+ REALTIME_PRIORITY_CLASS,
+ INFINITE)
# Windows specific extended namespace
@@ -43,25 +43,25 @@ WAIT_TIMEOUT = 0x00000102 # 258 in decimal
ACCESS_DENIED_SET = frozenset([errno.EPERM, errno.EACCES, ERROR_ACCESS_DENIED])
TCP_STATUSES = {
- _psutil_mswindows.MIB_TCP_STATE_ESTAB: CONN_ESTABLISHED,
- _psutil_mswindows.MIB_TCP_STATE_SYN_SENT: CONN_SYN_SENT,
- _psutil_mswindows.MIB_TCP_STATE_SYN_RCVD: CONN_SYN_RECV,
- _psutil_mswindows.MIB_TCP_STATE_FIN_WAIT1: CONN_FIN_WAIT1,
- _psutil_mswindows.MIB_TCP_STATE_FIN_WAIT2: CONN_FIN_WAIT2,
- _psutil_mswindows.MIB_TCP_STATE_TIME_WAIT: CONN_TIME_WAIT,
- _psutil_mswindows.MIB_TCP_STATE_CLOSED: CONN_CLOSE,
- _psutil_mswindows.MIB_TCP_STATE_CLOSE_WAIT: CONN_CLOSE_WAIT,
- _psutil_mswindows.MIB_TCP_STATE_LAST_ACK: CONN_LAST_ACK,
- _psutil_mswindows.MIB_TCP_STATE_LISTEN: CONN_LISTEN,
- _psutil_mswindows.MIB_TCP_STATE_CLOSING: CONN_CLOSING,
- _psutil_mswindows.MIB_TCP_STATE_DELETE_TCB: CONN_DELETE_TCB,
- _psutil_mswindows.PSUTIL_CONN_NONE: CONN_NONE,
+ _psutil_windows.MIB_TCP_STATE_ESTAB: CONN_ESTABLISHED,
+ _psutil_windows.MIB_TCP_STATE_SYN_SENT: CONN_SYN_SENT,
+ _psutil_windows.MIB_TCP_STATE_SYN_RCVD: CONN_SYN_RECV,
+ _psutil_windows.MIB_TCP_STATE_FIN_WAIT1: CONN_FIN_WAIT1,
+ _psutil_windows.MIB_TCP_STATE_FIN_WAIT2: CONN_FIN_WAIT2,
+ _psutil_windows.MIB_TCP_STATE_TIME_WAIT: CONN_TIME_WAIT,
+ _psutil_windows.MIB_TCP_STATE_CLOSED: CONN_CLOSE,
+ _psutil_windows.MIB_TCP_STATE_CLOSE_WAIT: CONN_CLOSE_WAIT,
+ _psutil_windows.MIB_TCP_STATE_LAST_ACK: CONN_LAST_ACK,
+ _psutil_windows.MIB_TCP_STATE_LISTEN: CONN_LISTEN,
+ _psutil_windows.MIB_TCP_STATE_CLOSING: CONN_CLOSING,
+ _psutil_windows.MIB_TCP_STATE_DELETE_TCB: CONN_DELETE_TCB,
+ _psutil_windows.PSUTIL_CONN_NONE: CONN_NONE,
}
@lru_cache(maxsize=512)
def _win32_QueryDosDevice(s):
- return _psutil_mswindows.win32_QueryDosDevice(s)
+ return _psutil_windows.win32_QueryDosDevice(s)
def _convert_raw_path(s):
@@ -84,7 +84,7 @@ nt_virtmem_info = namedtuple('vmem', ' '.join([
def virtual_memory():
"""System virtual memory as a namedtuple."""
- mem = _psutil_mswindows.get_virtual_mem()
+ mem = _psutil_windows.get_virtual_mem()
totphys, availphys, totpagef, availpagef, totvirt, freevirt = mem
#
total = totphys
@@ -97,7 +97,7 @@ def virtual_memory():
def swap_memory():
"""Swap system memory as a (total, used, free, sin, sout) tuple."""
- mem = _psutil_mswindows.get_virtual_mem()
+ mem = _psutil_windows.get_virtual_mem()
total = mem[2]
free = mem[3]
used = total - free
@@ -108,7 +108,7 @@ def swap_memory():
def get_disk_usage(path):
"""Return disk usage associated with path."""
try:
- total, free = _psutil_mswindows.get_disk_usage(path)
+ total, free = _psutil_windows.get_disk_usage(path)
except WindowsError:
if not os.path.exists(path):
msg = "No such file or directory: '%s'" % path
@@ -121,7 +121,7 @@ def get_disk_usage(path):
def disk_partitions(all):
"""Return disk partitions."""
- rawlist = _psutil_mswindows.get_disk_partitions(all)
+ rawlist = _psutil_windows.get_disk_partitions(all)
return [nt_partition(*x) for x in rawlist]
@@ -129,14 +129,14 @@ _cputimes_ntuple = namedtuple('cputimes', 'user system idle')
def get_system_cpu_times():
"""Return system CPU times as a named tuple."""
- user, system, idle = _psutil_mswindows.get_system_cpu_times()
+ user, system, idle = _psutil_windows.get_system_cpu_times()
return _cputimes_ntuple(user, system, idle)
def get_system_per_cpu_times():
"""Return system per-CPU times as a list of named tuples."""
ret = []
- for cpu_t in _psutil_mswindows.get_system_per_cpu_times():
+ for cpu_t in _psutil_windows.get_system_per_cpu_times():
user, system, idle = cpu_t
item = _cputimes_ntuple(user, system, idle)
ret.append(item)
@@ -145,18 +145,18 @@ def get_system_per_cpu_times():
def get_num_cpus():
"""Return the number of logical CPUs in the system."""
- return _psutil_mswindows.get_num_cpus()
+ return _psutil_windows.get_num_cpus()
def get_system_boot_time():
"""The system boot time expressed in seconds since the epoch."""
- return _psutil_mswindows.get_system_boot_time()
+ return _psutil_windows.get_system_boot_time()
def get_system_users():
"""Return currently connected users as a list of namedtuples."""
retlist = []
- rawlist = _psutil_mswindows.get_system_users()
+ rawlist = _psutil_windows.get_system_users()
for item in rawlist:
user, hostname, tstamp = item
nt = nt_user(user, None, hostname, tstamp)
@@ -164,11 +164,11 @@ def get_system_users():
return retlist
-get_pids = _psutil_mswindows.get_pids
-pid_exists = _psutil_mswindows.pid_exists
-net_io_counters = _psutil_mswindows.get_net_io_counters
-disk_io_counters = _psutil_mswindows.get_disk_io_counters
-get_ppid_map = _psutil_mswindows.get_ppid_map # not meant to be public
+get_pids = _psutil_windows.get_pids
+pid_exists = _psutil_windows.pid_exists
+net_io_counters = _psutil_windows.get_net_io_counters
+disk_io_counters = _psutil_windows.get_disk_io_counters
+get_ppid_map = _psutil_windows.get_ppid_map # not meant to be public
def wrap_exceptions(fun):
@@ -217,12 +217,12 @@ class Process(object):
# Note: os.path.exists(path) may return False even if the file
# is there, see:
# http://stackoverflow.com/questions/3112546/os-path-exists-lies
- return _convert_raw_path(_psutil_mswindows.get_process_exe(self.pid))
+ return _convert_raw_path(_psutil_windows.get_process_exe(self.pid))
@wrap_exceptions
def get_cmdline(self):
"""Return process cmdline as a list of arguments."""
- return _psutil_mswindows.get_process_cmdline(self.pid)
+ return _psutil_windows.get_process_cmdline(self.pid)
def get_ppid(self):
"""Return process parent pid."""
@@ -233,11 +233,11 @@ class Process(object):
def _get_raw_meminfo(self):
try:
- return _psutil_mswindows.get_process_memory_info(self.pid)
+ return _psutil_windows.get_process_memory_info(self.pid)
except OSError:
err = sys.exc_info()[1]
if err.errno in ACCESS_DENIED_SET:
- return _psutil_mswindows.get_process_memory_info_2(self.pid)
+ return _psutil_windows.get_process_memory_info_2(self.pid)
raise
@wrap_exceptions
@@ -271,7 +271,7 @@ class Process(object):
def get_memory_maps(self):
try:
- raw = _psutil_mswindows.get_process_memory_maps(self.pid)
+ raw = _psutil_windows.get_process_memory_maps(self.pid)
except OSError:
# XXX - can't use wrap_exceptions decorator as we're
# returning a generator; probably needs refactoring.
@@ -290,7 +290,7 @@ class Process(object):
@wrap_exceptions
def kill_process(self):
"""Terminates the process with the given PID."""
- return _psutil_mswindows.kill_process(self.pid)
+ return _psutil_windows.kill_process(self.pid)
@wrap_exceptions
def process_wait(self, timeout=None):
@@ -299,7 +299,7 @@ class Process(object):
else:
# WaitForSingleObject() expects time in milliseconds
timeout = int(timeout * 1000)
- ret = _psutil_mswindows.process_wait(self.pid, timeout)
+ ret = _psutil_windows.process_wait(self.pid, timeout)
if ret == WAIT_TIMEOUT:
raise TimeoutExpired(self.pid, self._process_name)
return ret
@@ -309,7 +309,7 @@ class Process(object):
"""Return the name of the user that owns the process"""
if self.pid in (0, 4):
return 'NT AUTHORITY\\SYSTEM'
- return _psutil_mswindows.get_process_username(self.pid)
+ return _psutil_windows.get_process_username(self.pid)
@wrap_exceptions
def get_create_time(self):
@@ -317,20 +317,20 @@ class Process(object):
if self.pid in (0, 4):
return get_system_boot_time()
try:
- return _psutil_mswindows.get_process_create_time(self.pid)
+ return _psutil_windows.get_process_create_time(self.pid)
except OSError:
err = sys.exc_info()[1]
if err.errno in ACCESS_DENIED_SET:
- return _psutil_mswindows.get_process_create_time_2(self.pid)
+ return _psutil_windows.get_process_create_time_2(self.pid)
raise
@wrap_exceptions
def get_num_threads(self):
- return _psutil_mswindows.get_process_num_threads(self.pid)
+ return _psutil_windows.get_process_num_threads(self.pid)
@wrap_exceptions
def get_threads(self):
- rawlist = _psutil_mswindows.get_process_threads(self.pid)
+ rawlist = _psutil_windows.get_process_threads(self.pid)
retlist = []
for thread_id, utime, stime in rawlist:
ntuple = nt_thread(thread_id, utime, stime)
@@ -340,22 +340,22 @@ class Process(object):
@wrap_exceptions
def get_cpu_times(self):
try:
- ret = _psutil_mswindows.get_process_cpu_times(self.pid)
+ ret = _psutil_windows.get_process_cpu_times(self.pid)
except OSError:
err = sys.exc_info()[1]
if err.errno in ACCESS_DENIED_SET:
- ret = _psutil_mswindows.get_process_cpu_times_2(self.pid)
+ ret = _psutil_windows.get_process_cpu_times_2(self.pid)
else:
raise
return nt_cputimes(*ret)
@wrap_exceptions
def suspend_process(self):
- return _psutil_mswindows.suspend_process(self.pid)
+ return _psutil_windows.suspend_process(self.pid)
@wrap_exceptions
def resume_process(self):
- return _psutil_mswindows.resume_process(self.pid)
+ return _psutil_windows.resume_process(self.pid)
@wrap_exceptions
def get_cwd(self):
@@ -363,7 +363,7 @@ class Process(object):
raise AccessDenied(self.pid, self._process_name)
# return a normalized pathname since the native C function appends
# "\\" at the and of the path
- path = _psutil_mswindows.get_process_cwd(self.pid)
+ path = _psutil_windows.get_process_cwd(self.pid)
return os.path.normpath(path)
@wrap_exceptions
@@ -375,7 +375,7 @@ class Process(object):
# "\Device\HarddiskVolume1\Windows\systemew\file.txt"
# Convert the first part in the corresponding drive letter
# (e.g. "C:\") by using Windows's QueryDosDevice()
- raw_file_names = _psutil_mswindows.get_process_open_files(self.pid)
+ raw_file_names = _psutil_windows.get_process_open_files(self.pid)
for file in raw_file_names:
file = _convert_raw_path(file)
if isfile_strict(file) and file not in retlist:
@@ -389,7 +389,7 @@ class Process(object):
raise ValueError("invalid %r kind argument; choose between %s"
% (kind, ', '.join([repr(x) for x in conn_tmap])))
families, types = conn_tmap[kind]
- rawlist = _psutil_mswindows.get_process_connections(self.pid, families,
+ rawlist = _psutil_windows.get_process_connections(self.pid, families,
types)
ret = []
for item in rawlist:
@@ -401,17 +401,17 @@ class Process(object):
@wrap_exceptions
def get_nice(self):
- return _psutil_mswindows.get_process_priority(self.pid)
+ return _psutil_windows.get_process_priority(self.pid)
@wrap_exceptions
def set_process_nice(self, value):
- return _psutil_mswindows.set_process_priority(self.pid, value)
+ return _psutil_windows.set_process_priority(self.pid, value)
# available on Windows >= Vista
- if hasattr(_psutil_mswindows, "get_process_io_priority"):
+ if hasattr(_psutil_windows, "get_process_io_priority"):
@wrap_exceptions
def get_ionice(self):
- return _psutil_mswindows.get_process_io_priority(self.pid)
+ return _psutil_windows.get_process_io_priority(self.pid)
@wrap_exceptions
def set_process_ionice(self, value, _):
@@ -421,23 +421,23 @@ class Process(object):
if value not in (2, 1, 0):
raise ValueError("value must be 2 (normal), 1 (low) or 0 "
"(very low); got %r" % value)
- return _psutil_mswindows.set_process_io_priority(self.pid, value)
+ return _psutil_windows.set_process_io_priority(self.pid, value)
@wrap_exceptions
def get_io_counters(self):
try:
- ret = _psutil_mswindows.get_process_io_counters(self.pid)
+ ret = _psutil_windows.get_process_io_counters(self.pid)
except OSError:
err = sys.exc_info()[1]
if err.errno in ACCESS_DENIED_SET:
- ret = _psutil_mswindows.get_process_io_counters_2(self.pid)
+ ret = _psutil_windows.get_process_io_counters_2(self.pid)
else:
raise
return nt_io(*ret)
@wrap_exceptions
def get_status(self):
- suspended = _psutil_mswindows.is_process_suspended(self.pid)
+ suspended = _psutil_windows.is_process_suspended(self.pid)
if suspended:
return STATUS_STOPPED
else:
@@ -446,7 +446,7 @@ class Process(object):
@wrap_exceptions
def get_cpu_affinity(self):
from_bitmask = lambda x: [i for i in xrange(64) if (1 << i) & x]
- bitmask = _psutil_mswindows.get_process_cpu_affinity(self.pid)
+ bitmask = _psutil_windows.get_process_cpu_affinity(self.pid)
return from_bitmask(bitmask)
@wrap_exceptions
@@ -468,19 +468,19 @@ class Process(object):
raise ValueError("invalid CPU %r" % cpu)
bitmask = to_bitmask(value)
- _psutil_mswindows.set_process_cpu_affinity(self.pid, bitmask)
+ _psutil_windows.set_process_cpu_affinity(self.pid, bitmask)
@wrap_exceptions
def get_num_handles(self):
try:
- return _psutil_mswindows.get_process_num_handles(self.pid)
+ return _psutil_windows.get_process_num_handles(self.pid)
except OSError:
err = sys.exc_info()[1]
if err.errno in ACCESS_DENIED_SET:
- return _psutil_mswindows.get_process_num_handles_2(self.pid)
+ return _psutil_windows.get_process_num_handles_2(self.pid)
raise
@wrap_exceptions
def get_num_ctx_switches(self):
- tupl = _psutil_mswindows.get_process_num_ctx_switches(self.pid)
+ tupl = _psutil_windows.get_process_num_ctx_switches(self.pid)
return nt_ctxsw(*tupl)
diff --git a/psutil/arch/mswindows/ntextapi.h b/psutil/arch/windows/ntextapi.h
index 99c7636e..99c7636e 100644
--- a/psutil/arch/mswindows/ntextapi.h
+++ b/psutil/arch/windows/ntextapi.h
diff --git a/psutil/arch/mswindows/process_handles.c b/psutil/arch/windows/process_handles.c
index d860f195..d860f195 100644
--- a/psutil/arch/mswindows/process_handles.c
+++ b/psutil/arch/windows/process_handles.c
diff --git a/psutil/arch/mswindows/process_handles.h b/psutil/arch/windows/process_handles.h
index 342ce8fd..342ce8fd 100644
--- a/psutil/arch/mswindows/process_handles.h
+++ b/psutil/arch/windows/process_handles.h
diff --git a/psutil/arch/mswindows/process_info.c b/psutil/arch/windows/process_info.c
index 3aeb7f4a..3aeb7f4a 100644
--- a/psutil/arch/mswindows/process_info.c
+++ b/psutil/arch/windows/process_info.c
diff --git a/psutil/arch/mswindows/process_info.h b/psutil/arch/windows/process_info.h
index ef94b9ae..ef94b9ae 100644
--- a/psutil/arch/mswindows/process_info.h
+++ b/psutil/arch/windows/process_info.h
diff --git a/psutil/arch/mswindows/security.c b/psutil/arch/windows/security.c
index 3d2c4023..3d2c4023 100644
--- a/psutil/arch/mswindows/security.c
+++ b/psutil/arch/windows/security.c
diff --git a/psutil/arch/mswindows/security.h b/psutil/arch/windows/security.h
index 98255e96..98255e96 100644
--- a/psutil/arch/mswindows/security.h
+++ b/psutil/arch/windows/security.h
diff --git a/setup.py b/setup.py
index e5876273..7aa3cc96 100644
--- a/setup.py
+++ b/setup.py
@@ -53,13 +53,13 @@ if sys.platform.startswith("win32"):
return '0x0%s' % ((maj * 100) + min)
extensions = [Extension(
- '_psutil_mswindows',
+ '_psutil_windows',
sources=[
- 'psutil/_psutil_mswindows.c',
+ 'psutil/_psutil_windows.c',
'psutil/_psutil_common.c',
- 'psutil/arch/mswindows/process_info.c',
- 'psutil/arch/mswindows/process_handles.c',
- 'psutil/arch/mswindows/security.c',
+ 'psutil/arch/windows/process_info.c',
+ 'psutil/arch/windows/process_handles.c',
+ 'psutil/arch/windows/security.c',
],
define_macros=[
# be nice to mingw, see:
diff --git a/test/_windows.py b/test/_windows.py
index 2fb81aeb..271761a7 100644
--- a/test/_windows.py
+++ b/test/_windows.py
@@ -16,10 +16,10 @@ import time
import traceback
import unittest
-import _psutil_mswindows
+import _psutil_windows
import psutil
from psutil._compat import PY3, callable, long
-from psutil._psmswindows import ACCESS_DENIED_SET
+from psutil._pswindows import ACCESS_DENIED_SET
from test_psutil import *
try:
@@ -316,8 +316,8 @@ class TestDualProcessImplementation(unittest.TestCase):
failures = []
for name, tolerance in self.fun_names:
- meth1 = wrap_exceptions(getattr(_psutil_mswindows, name))
- meth2 = wrap_exceptions(getattr(_psutil_mswindows, name + '_2'))
+ meth1 = wrap_exceptions(getattr(_psutil_windows, name))
+ meth2 = wrap_exceptions(getattr(_psutil_windows, name + '_2'))
for p in psutil.process_iter():
if name == 'get_process_memory_info' and p.pid == os.getpid():
continue
@@ -358,7 +358,7 @@ class TestDualProcessImplementation(unittest.TestCase):
# process no longer exists
ZOMBIE_PID = max(psutil.get_pids()) + 5000
for name, _ in self.fun_names:
- meth = wrap_exceptions(getattr(_psutil_mswindows, name))
+ meth = wrap_exceptions(getattr(_psutil_windows, name))
self.assertRaises(psutil.NoSuchProcess, meth, ZOMBIE_PID)