-
Notifications
You must be signed in to change notification settings - Fork 20
/
Network Tech.py
34 lines (26 loc) · 1.17 KB
/
Network Tech.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright 2017 Glen Harmon
import logging
import sublime
from .lib.detect_syntax import AutoSyntaxDetection # noqa
from .lib.format_ import DashFormatMacCommand # noqa
from .lib.format_ import (ColonFormatMacCommand, DotFormatMacCommand,
FormatMacCommand)
from .lib.increment import (DecrementIpCommand, DecrementNetworkCommand,
DecrementSubnetCommand, IncrementIpCommand,
IncrementNetworkCommand, IncrementSubnetCommand)
# from .lib.passwords import PasswordDecryptViewListener, DecodePasswordCommand # noqa
from .lib.passwords import DecodePasswordCommand # noqa
from .lib.search.network import FindSubnetCommand, NetworkInfoListener # noqa
from .lib.settings import ToggleNetworkInfoOnHoverCommand # noqa
logger = logging.getLogger("network_tech")
logger.handlers = []
settings = sublime.load_settings("network_tech.sublime-settings")
log_level = settings.get("log_level", "warning") or "warning"
logger.setLevel(getattr(logging, log_level.upper()))
class SearchHistory(list):
@property
def last(self):
last = None
if self:
last = self[0]
return last