1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 """
20 Contains cross platform classes and utilities for starting, stopping and monitoring processes.
21
22 The module contains the base class L{pysys.process.user} that can be extended by subclasses that
23 require the ability to start, stop, interact and monitor processes started by the PySys
24 framework. Subclasses within the framework are the L{pysys.basetest.BaseTest} and
25 L{pysys.baserunner.BaseRunner} classes, both of which may be required to start processes as part
26 of the execution of a set of testcases. The import path of the helper and monitor modules is set up
27 at runtime so as to select either the Win32 modules (located in pysys.process.plat-win32), or the
28 unix modules (located in pysys.process.plat-unix); both modules are written to display common
29 functionality in order to provide a unified abstraction where the user is not required to select the
30 correct modules based on their current operation system.
31
32 """
33
34 import os.path
35 from pysys.constants import *
36
37
38 __all__ = [ "helper",
39 "monitor",
40 "user" ]
41
42
43 dirname = __path__[0]
44 if PLATFORM in [ "sunos", "linux" ]:
45 __path__.append(os.path.join(dirname, "plat-unix"))
46 else:
47 __path__.append(os.path.join(dirname, "plat-win32"))
48