OXIESEC PANEL
- Current Dir:
/
/
snap
/
core20
/
2599
/
usr
/
lib
/
python3
/
dist-packages
/
urwid
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/26/2025 10:13:33 PM
rwxr-xr-x
📄
__init__.py
3.96 KB
01/21/2018 08:02:02 PM
rw-r--r--
📁
__pycache__
-
05/26/2025 10:13:33 PM
rwxr-xr-x
📄
canvas.py
40.76 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
command_map.py
3.26 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
compat.py
3.32 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
container.py
83.05 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
curses_display.py
19.87 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
decoration.py
40.63 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
display_common.py
30.51 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
escape.py
13.48 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
font.py
24.05 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
graphics.py
31.48 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
html_fragment.py
8 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
lcd_display.py
15.91 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
listbox.py
59.11 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
main_loop.py
48.85 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
monitored_list.py
16.45 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
old_str_util.py
9.83 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
raw_display.py
35.32 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
signals.py
12.42 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
split_repr.py
4.29 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
str_util.cpython-38-x86_64-linux-gnu.so
20.98 KB
03/23/2020 01:58:15 AM
rw-r--r--
📁
tests
-
05/26/2025 10:13:33 PM
rwxr-xr-x
📄
text_layout.py
16.94 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
treetools.py
15.24 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
util.py
12.94 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
version.py
143 bytes
01/21/2018 08:02:02 PM
rw-r--r--
📄
vterm.py
49.31 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
web_display.py
30.8 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
widget.py
60.28 KB
01/21/2018 08:02:02 PM
rw-r--r--
📄
wimp.py
21.3 KB
01/21/2018 08:02:02 PM
rw-r--r--
Editing: compat.py
Close
#!/usr/bin/python # -*- coding: utf-8 -*- # # Urwid python compatibility definitions # Copyright (C) 2011 Ian Ward # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Urwid web site: http://excess.org/urwid/ from __future__ import division, print_function import sys try: # python 2.4 and 2.5 compat bytes = bytes except NameError: bytes = str PYTHON3 = sys.version_info > (3, 0) # for iterating over byte strings: # ord2 calls ord in python2 only # chr2 converts an ordinal value to a length-1 byte string # B returns a byte string in all supported python versions # bytes3 creates a byte string from a list of ordinal values if PYTHON3: ord2 = lambda x: x chr2 = lambda x: bytes([x]) B = lambda x: x.encode('iso8859-1') bytes3 = bytes text_type = str xrange = range text_types = (str,) def reraise(tp, value, tb=None): """ Reraise an exception. Taken from "six" library (https://pythonhosted.org/six/). """ try: if value is None: value = tp() if value.__traceback__ is not tb: raise value.with_traceback(tb) raise value finally: value = None tb = None else: ord2 = ord chr2 = chr B = lambda x: x bytes3 = lambda x: bytes().join([chr(c) for c in x]) text_type = unicode xrange = xrange text_types = (str, unicode) """ Reraise an exception. Taken from "six" library (https://pythonhosted.org/six/). """ def exec_(_code_, _globs_=None, _locs_=None): """Execute code in a namespace.""" if _globs_ is None: frame = sys._getframe(1) _globs_ = frame.f_globals if _locs_ is None: _locs_ = frame.f_locals del frame elif _locs_ is None: _locs_ = _globs_ exec("""exec _code_ in _globs_, _locs_""") exec_("""def reraise(tp, value, tb=None): try: raise tp, value, tb finally: tb = None """) def with_metaclass(meta, *bases): """ Create a base class with a metaclass. Taken from "six" library (https://pythonhosted.org/six/). """ # This requires a bit of explanation: the basic idea is to make a dummy # metaclass for one level of class instantiation that replaces itself with # the actual metaclass. class metaclass(type): def __new__(cls, name, this_bases, d): return meta(name, bases, d) @classmethod def __prepare__(cls, name, this_bases): return meta.__prepare__(name, bases) return type.__new__(metaclass, 'temporary_class', (), {})