23 |
23 |
24 |
24 |
25 from __future__ import absolute_import |
25 from __future__ import absolute_import |
26 from threading import Timer, Thread, Lock, Semaphore, Event |
26 from threading import Timer, Thread, Lock, Semaphore, Event |
27 import ctypes |
27 import ctypes |
|
28 import _ctypes |
28 import os |
29 import os |
29 import sys |
30 import sys |
30 import traceback |
31 import traceback |
31 from time import time |
32 from time import time |
32 |
|
33 import Pyro.core as pyro |
33 import Pyro.core as pyro |
34 |
34 |
35 from runtime.typemapping import TypeTranslator |
35 from runtime.typemapping import TypeTranslator |
36 from runtime.loglevels import LogLevelsDefault, LogLevelsCount |
36 from runtime.loglevels import LogLevelsDefault, LogLevelsCount |
37 |
37 |
38 |
|
39 if os.name in ("nt", "ce"): |
38 if os.name in ("nt", "ce"): |
40 from _ctypes import LoadLibrary as dlopen |
39 dlopen = _ctypes.LoadLibrary |
41 from _ctypes import FreeLibrary as dlclose |
40 dlclose = _ctypes.FreeLibrary |
42 elif os.name == "posix": |
41 elif os.name == "posix": |
43 from _ctypes import dlopen, dlclose |
42 dlopen = _ctypes.dlopen |
|
43 dlclose = _ctypes.dlclose |
44 |
44 |
45 |
45 |
46 def get_last_traceback(tb): |
46 def get_last_traceback(tb): |
47 while tb.tb_next: |
47 while tb.tb_next: |
48 tb = tb.tb_next |
48 tb = tb.tb_next |