Rename project to SIMtrace Analyser (v2.0.0)
- move the analysis server out of simtrace2_pysniff into simtrace_analyser; simtrace2_pysniff stays as the simtrace2-sniff replacement capture utility - new server CLI: simtrace-analyser-server; python -m simtrace_analyser (simtrace2-pysniff-server and python -m simtrace2_pysniff.server dropped) - simtrace2_pysniff lazy-imports hardware symbols, so the server no longer pulls PyUSB at startup; the GSMTAP/PCAP codecs work without libusb - version 2.0.0 everywhere (was 1.22.21); PWA SW cache simtrace-analyser-v54 - frontend: server name, clone URL and i18n strings updated; vendored-parser reference otaman -> SIMple - README/README_RUS reworked product-first (analyser first, utility second) - DB dir ~/.simtrace-analyser, /api status payload and hosted PWA unchanged
This commit is contained in:
1 parent
8441b56e99
commit
38650b4797
20 files changed
+392
-323
No files matched your search
@@ -1,12 +1,11 @@
|
||||
"""simtrace2-pysniff — Python replacement for simtrace2-sniff."""
|
||||
"""simtrace2-pysniff — Python replacement for simtrace2-sniff.
|
||||
|
||||
from .device import SniffSession, DeviceDisconnected, find_sniffer_device
|
||||
from .protocol import parse_message, SniffMessage
|
||||
from .gsmtap import GsmtapSender, GsmtapReceiver
|
||||
from .pcap import PcapWriter
|
||||
from .dump import FileDumper, format_message
|
||||
Capture utility bundled with SIMtrace Analyser. Hardware access (PyUSB) is
|
||||
imported lazily, so the GSMTAP/PCAP codec modules can be used without libusb.
|
||||
"""
|
||||
|
||||
from simtrace_analyser.version import __version__
|
||||
|
||||
__version__ = '1.22.21'
|
||||
__all__ = [
|
||||
'SniffSession',
|
||||
'DeviceDisconnected',
|
||||
@@ -20,3 +19,28 @@ __all__ = [
|
||||
'format_message',
|
||||
'__version__',
|
||||
]
|
||||
|
||||
_LAZY_IMPORTS = {
|
||||
'SniffSession': ('.device', 'SniffSession'),
|
||||
'DeviceDisconnected': ('.device', 'DeviceDisconnected'),
|
||||
'find_sniffer_device': ('.device', 'find_sniffer_device'),
|
||||
'parse_message': ('.protocol', 'parse_message'),
|
||||
'SniffMessage': ('.protocol', 'SniffMessage'),
|
||||
'GsmtapSender': ('.gsmtap', 'GsmtapSender'),
|
||||
'GsmtapReceiver': ('.gsmtap', 'GsmtapReceiver'),
|
||||
'PcapWriter': ('.pcap', 'PcapWriter'),
|
||||
'FileDumper': ('.dump', 'FileDumper'),
|
||||
'format_message': ('.dump', 'format_message'),
|
||||
}
|
||||
|
||||
|
||||
def __getattr__(name):
|
||||
"""Import utility symbols on first use (PEP 562)."""
|
||||
try:
|
||||
module_name, attr = _LAZY_IMPORTS[name]
|
||||
except KeyError:
|
||||
raise AttributeError(f'module {__name__!r} has no attribute {name!r}') from None
|
||||
from importlib import import_module
|
||||
value = getattr(import_module(module_name, __name__), attr)
|
||||
globals()[name] = value
|
||||
return value
|
||||
Reference in new issue
Block a user