OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3
/
dist-packages
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/21/2019 03:48:35 PM
rwxr-xr-x
📁
Automat-0.6.0.egg-info
-
10/21/2019 03:49:23 PM
rwxr-xr-x
📁
CommandNotFound
-
05/09/2024 07:14:56 AM
rwxr-xr-x
📁
ConfigArgParse-0.11.0.egg-info
-
07/12/2020 04:36:14 PM
rwxr-xr-x
📁
Crypto
-
05/09/2024 06:57:58 AM
rwxr-xr-x
📁
DistUpgrade
-
05/09/2024 07:15:53 AM
rwxr-xr-x
📁
HweSupportStatus
-
10/28/2024 08:41:33 AM
rwxr-xr-x
📁
Jinja2-2.10.egg-info
-
10/21/2019 03:49:31 PM
rwxr-xr-x
📁
LanguageSelector
-
10/21/2019 03:50:05 PM
rwxr-xr-x
📁
MarkupSafe-1.0.egg-info
-
10/21/2019 03:49:31 PM
rwxr-xr-x
📁
OpenSSL
-
10/21/2019 03:50:02 PM
rwxr-xr-x
📄
PAM-0.4.2.egg-info
193 bytes
08/04/2017 04:59:28 AM
rw-r--r--
📄
PAM.cpython-36m-x86_64-linux-gnu.so
19.42 KB
08/04/2017 04:59:28 AM
rw-r--r--
📄
PyICU-1.9.8.egg-info
10.32 KB
11/09/2017 07:22:14 AM
rw-r--r--
📄
PyICU.py
1.43 KB
02/08/2016 11:30:00 PM
rw-r--r--
📁
PyJWT-1.5.3.egg-info
-
07/20/2022 06:59:45 AM
rwxr-xr-x
📄
PyYAML-3.12.egg-info
1.48 KB
08/05/2017 04:28:08 PM
rw-r--r--
📄
README.txt
119 bytes
03/10/2023 04:46:00 PM
rw-r--r--
📁
SecretStorage-2.3.1.egg-info
-
05/09/2024 06:57:57 AM
rwxr-xr-x
📁
Twisted-17.9.0.egg-info
-
03/31/2022 06:22:38 AM
rwxr-xr-x
📁
UpdateManager
-
10/28/2024 08:41:33 AM
rwxr-xr-x
📁
__pycache__
-
11/10/2024 09:42:49 AM
rwxr-xr-x
📄
_cffi_backend.cpython-36m-x86_64-linux-gnu.so
165.56 KB
02/27/2018 07:34:07 PM
rw-r--r--
📄
_dbus_bindings.cpython-36m-x86_64-linux-gnu.so
155.67 KB
01/29/2018 07:57:57 PM
rw-r--r--
📄
_dbus_glib_bindings.cpython-36m-x86_64-linux-gnu.so
18.7 KB
01/29/2018 07:57:57 PM
rw-r--r--
📄
_icu.cpython-36m-x86_64-linux-gnu.so
710.82 KB
11/09/2017 07:22:14 AM
rw-r--r--
📄
_snack.cpython-36m-x86_64-linux-gnu.so
42.59 KB
01/12/2018 04:42:24 PM
rw-r--r--
📄
_version.py
21 bytes
08/26/2014 01:11:36 AM
rw-r--r--
📄
_yaml.cpython-36m-x86_64-linux-gnu.so
220.16 KB
08/05/2017 04:28:08 PM
rw-r--r--
📁
acme
-
07/12/2020 04:36:20 PM
rwxr-xr-x
📁
acme-0.31.0.egg-info
-
07/12/2020 04:36:14 PM
rwxr-xr-x
📁
apport
-
05/09/2024 07:15:23 AM
rwxr-xr-x
📄
apport_python_hook.py
7.87 KB
05/13/2020 10:12:14 PM
rw-r--r--
📁
apt
-
05/09/2024 07:14:28 AM
rwxr-xr-x
📄
apt_inst.cpython-36m-x86_64-linux-gnu.so
50.37 KB
12/01/2022 12:36:29 PM
rw-r--r--
📄
apt_inst.pyi
227 bytes
12/01/2022 12:36:29 PM
rw-r--r--
📄
apt_pkg.cpython-36m-x86_64-linux-gnu.so
338.66 KB
12/01/2022 12:36:29 PM
rw-r--r--
📄
apt_pkg.pyi
8.69 KB
12/01/2022 12:36:29 PM
rw-r--r--
📁
aptsources
-
05/09/2024 07:14:28 AM
rwxr-xr-x
📁
asn1crypto
-
10/21/2019 03:49:46 PM
rwxr-xr-x
📁
asn1crypto-0.24.0.egg-info
-
10/21/2019 03:49:23 PM
rwxr-xr-x
📁
attr
-
10/21/2019 03:49:50 PM
rwxr-xr-x
📁
attrs-17.4.0.egg-info
-
10/21/2019 03:49:23 PM
rwxr-xr-x
📁
automat
-
10/21/2019 03:49:51 PM
rwxr-xr-x
📁
blinker
-
10/21/2019 03:49:46 PM
rwxr-xr-x
📄
blinker-1.4.egg-info
3.81 KB
01/11/2018 02:57:15 PM
rw-r--r--
📁
certbot
-
05/25/2021 01:14:26 PM
rwxr-xr-x
📁
certbot-0.31.0.egg-info
-
05/25/2021 01:14:26 PM
rwxr-xr-x
📁
certbot_dns_digitalocean
-
05/25/2021 01:14:28 PM
rwxr-xr-x
📁
certbot_dns_digitalocean-0.23.0.egg-info
-
05/25/2021 01:14:26 PM
rwxr-xr-x
📁
certifi
-
10/21/2019 03:49:43 PM
rwxr-xr-x
📁
certifi-2018.1.18.egg-info
-
10/21/2019 03:49:19 PM
rwxr-xr-x
📁
chardet
-
10/21/2019 03:49:47 PM
rwxr-xr-x
📁
chardet-3.0.4.egg-info
-
10/21/2019 03:49:15 PM
rwxr-xr-x
📁
click
-
10/21/2019 03:49:53 PM
rwxr-xr-x
📁
click-6.7.egg-info
-
10/21/2019 03:49:31 PM
rwxr-xr-x
📁
cloud_init-23.1.2.egg-info
-
05/09/2024 07:14:27 AM
rwxr-xr-x
📁
cloudinit
-
05/09/2024 07:15:07 AM
rwxr-xr-x
📁
colorama
-
10/21/2019 03:49:43 PM
rwxr-xr-x
📁
colorama-0.3.7.egg-info
-
10/21/2019 03:49:31 PM
rwxr-xr-x
📄
command_not_found-0.3.egg-info
189 bytes
02/14/2022 05:26:36 PM
rw-r--r--
📄
configargparse.py
40.35 KB
09/05/2016 01:22:39 AM
rw-r--r--
📁
configobj-5.0.6.egg-info
-
05/09/2024 07:14:03 AM
rwxr-xr-x
📄
configobj.py
87.51 KB
02/05/2018 01:01:15 PM
rw-r--r--
📁
constantly
-
10/21/2019 03:49:41 PM
rwxr-xr-x
📁
constantly-15.1.0.egg-info
-
10/21/2019 03:49:23 PM
rwxr-xr-x
📁
cryptography
-
11/05/2020 06:02:51 AM
rwxr-xr-x
📁
cryptography-2.1.4.egg-info
-
11/05/2020 06:02:51 AM
rwxr-xr-x
📄
cv2.cpython-36m-x86_64-linux-gnu.so
2.78 MB
09/20/2018 09:28:13 AM
rw-r--r--
📁
dbus
-
10/21/2019 03:48:44 PM
rwxr-xr-x
📄
deb822.py
146 bytes
02/17/2018 05:37:18 AM
rw-r--r--
📄
debconf.py
6.61 KB
05/06/2019 04:30:30 PM
rw-r--r--
📁
debian
-
10/21/2019 03:49:51 PM
rwxr-xr-x
📁
debian_bundle
-
10/21/2019 03:49:51 PM
rwxr-xr-x
📁
digitalocean
-
05/25/2021 01:14:28 PM
rwxr-xr-x
📁
distro_info-0.18ubuntu0.18.04.1.egg-info
-
10/21/2019 03:49:16 PM
rwxr-xr-x
📄
distro_info.py
10.68 KB
03/07/2019 07:33:56 PM
rw-r--r--
📁
distro_info_test
-
10/21/2019 03:49:40 PM
rwxr-xr-x
📄
easy_install.py
126 bytes
03/18/2018 02:41:50 PM
rw-r--r--
📁
future
-
07/12/2020 04:36:17 PM
rwxr-xr-x
📁
future-0.15.2.egg-info
-
07/12/2020 04:36:14 PM
rwxr-xr-x
📁
gi
-
10/21/2019 03:49:07 PM
rwxr-xr-x
📁
httplib2
-
05/09/2024 07:15:03 AM
rwxr-xr-x
📄
httplib2-0.9.2.egg-info
2.22 KB
12/15/2020 08:09:40 PM
rw-r--r--
📁
hyperlink
-
10/21/2019 03:49:51 PM
rwxr-xr-x
📁
hyperlink-17.3.1.egg-info
-
10/21/2019 03:49:23 PM
rwxr-xr-x
📁
icu
-
07/12/2020 04:36:17 PM
rwxr-xr-x
📁
idna
-
10/21/2019 03:49:42 PM
rwxr-xr-x
📁
idna-2.6.egg-info
-
10/21/2019 03:49:19 PM
rwxr-xr-x
📁
incremental
-
10/21/2019 03:49:40 PM
rwxr-xr-x
📁
incremental-16.10.1.egg-info
-
10/21/2019 03:49:23 PM
rwxr-xr-x
📁
janitor
-
10/28/2024 08:41:33 AM
rwxr-xr-x
📁
jinja2
-
10/21/2019 03:49:48 PM
rwxr-xr-x
📁
josepy
-
07/12/2020 04:36:18 PM
rwxr-xr-x
📁
josepy-1.1.0.egg-info
-
07/12/2020 04:36:14 PM
rwxr-xr-x
📁
jsonpatch-1.16.egg-info
-
10/21/2019 03:49:31 PM
rwxr-xr-x
📄
jsonpatch.py
26.19 KB
06/15/2017 03:41:06 PM
rw-r--r--
📁
jsonpickle
-
05/25/2021 01:14:27 PM
rwxr-xr-x
📄
jsonpickle-0.9.5.egg-info
1.01 KB
08/21/2017 09:29:37 AM
rw-r--r--
📁
jsonpointer-1.10.egg-info
-
10/21/2019 03:49:31 PM
rwxr-xr-x
📄
jsonpointer.py
9.15 KB
10/28/2015 07:06:37 PM
rw-r--r--
📁
jsonschema
-
10/21/2019 03:49:46 PM
rwxr-xr-x
📁
jsonschema-2.6.0.egg-info
-
10/21/2019 03:49:31 PM
rwxr-xr-x
📁
jwt
-
07/20/2022 06:59:45 AM
rwxr-xr-x
📁
keyring
-
05/09/2024 06:58:01 AM
rwxr-xr-x
📁
keyring-10.6.0.egg-info
-
05/09/2024 06:57:57 AM
rwxr-xr-x
📁
keyrings
-
05/09/2024 06:57:57 AM
rwxr-xr-x
📁
keyrings.alt-3.0.egg-info
-
05/09/2024 06:57:57 AM
rwxr-xr-x
📁
landscape
-
05/09/2024 07:14:55 AM
rwxr-xr-x
📁
language_selector-0.1.egg-info
-
10/21/2019 03:49:13 PM
rwxr-xr-x
📄
language_support_pkgs.py
9.89 KB
11/16/2017 08:34:16 PM
rw-r--r--
📁
libfuturize
-
07/12/2020 04:36:17 PM
rwxr-xr-x
📁
libpasteurize
-
07/12/2020 04:36:18 PM
rwxr-xr-x
📄
lsb_release.py
14.09 KB
08/07/2017 09:55:07 PM
rw-r--r--
📁
markupsafe
-
10/21/2019 03:49:45 PM
rwxr-xr-x
📁
mock
-
07/12/2020 04:36:16 PM
rwxr-xr-x
📁
mock-2.0.0.egg-info
-
07/12/2020 04:36:14 PM
rwxr-xr-x
📁
ndg
-
07/12/2020 04:36:18 PM
rwxr-xr-x
📁
ndg_httpsclient-0.4.4.egg-info
-
07/12/2020 04:36:14 PM
rwxr-xr-x
📁
netifaces-0.10.4.egg-info
-
10/21/2019 03:49:07 PM
rwxr-xr-x
📄
netifaces.cpython-36m-x86_64-linux-gnu.so
18.59 KB
08/04/2017 06:49:42 AM
rw-r--r--
📁
numpy
-
10/28/2024 08:45:52 AM
rwxr-xr-x
📁
numpy-1.13.3.egg-info
-
10/28/2024 08:45:52 AM
rwxr-xr-x
📁
oauthlib
-
10/21/2019 03:49:53 PM
rwxr-xr-x
📁
oauthlib-2.0.6.egg-info
-
10/21/2019 03:49:32 PM
rwxr-xr-x
📁
parsedatetime
-
07/12/2020 04:36:19 PM
rwxr-xr-x
📁
parsedatetime-2.4.egg-info
-
07/12/2020 04:36:14 PM
rwxr-xr-x
📁
past
-
07/12/2020 04:36:18 PM
rwxr-xr-x
📁
pbr
-
07/12/2020 04:36:16 PM
rwxr-xr-x
📁
pbr-3.1.1.egg-info
-
07/12/2020 04:36:14 PM
rwxr-xr-x
📁
pexpect
-
09/28/2022 06:45:12 AM
rwxr-xr-x
📄
pexpect-4.2.1.egg-info
2.23 KB
12/12/2016 02:59:09 PM
rw-r--r--
📁
pip
-
05/09/2024 06:58:02 AM
rwxr-xr-x
📁
pip-9.0.1.egg-info
-
05/09/2024 06:57:57 AM
rwxr-xr-x
📁
pkg_resources
-
05/09/2024 06:58:00 AM
rwxr-xr-x
📄
problem_report.py
26.28 KB
11/11/2019 09:57:56 PM
rw-r--r--
📁
ptyprocess
-
09/28/2022 06:45:11 AM
rwxr-xr-x
📁
pyOpenSSL-17.5.0.egg-info
-
10/21/2019 03:49:23 PM
rwxr-xr-x
📁
pyRFC3339-1.0.egg-info
-
07/12/2020 04:36:14 PM
rwxr-xr-x
📁
pyasn1
-
10/21/2019 03:49:47 PM
rwxr-xr-x
📁
pyasn1-0.4.2.egg-info
-
10/21/2019 03:49:23 PM
rwxr-xr-x
📁
pyasn1_modules
-
10/21/2019 03:49:49 PM
rwxr-xr-x
📄
pyasn1_modules-0.2.1.egg-info
1.68 KB
01/02/2018 11:18:24 AM
rw-r--r--
📄
pycrypto-2.6.1.egg-info
666 bytes
04/03/2018 01:26:21 PM
rw-r--r--
📄
pygobject-3.26.1.egg-info
1013 bytes
01/29/2019 12:46:03 PM
rw-r--r--
📁
pygtkcompat
-
10/21/2019 03:49:07 PM
rwxr-xr-x
📁
pyrfc3339
-
07/12/2020 04:36:19 PM
rwxr-xr-x
📄
pyserial-3.4.egg-info
1.62 KB
04/09/2018 11:57:25 AM
rw-r--r--
📄
python_apt-1.6.6.egg-info
226 bytes
12/01/2022 12:36:29 PM
rw-r--r--
📁
python_debian-0.1.32.egg-info
-
10/21/2019 03:49:15 PM
rwxr-xr-x
📁
python_digitalocean-1.13.2.egg-info
-
05/25/2021 01:14:26 PM
rwxr-xr-x
📁
pytz
-
07/12/2020 04:36:19 PM
rwxr-xr-x
📁
pytz-2018.3.egg-info
-
07/12/2020 04:36:14 PM
rwxr-xr-x
📄
pyxdg-0.25.egg-info
576 bytes
01/07/2021 02:49:21 AM
rw-r--r--
📁
requests
-
10/21/2019 03:49:53 PM
rwxr-xr-x
📁
requests-2.18.4.egg-info
-
10/21/2019 03:49:19 PM
rwxr-xr-x
📁
requests_toolbelt
-
07/12/2020 04:36:15 PM
rwxr-xr-x
📁
requests_toolbelt-0.8.0.egg-info
-
07/12/2020 04:36:14 PM
rwxr-xr-x
📁
requests_unixsocket
-
10/21/2019 03:50:04 PM
rwxr-xr-x
📁
requests_unixsocket-0.1.5.egg-info
-
10/21/2019 03:49:19 PM
rwxr-xr-x
📁
secretstorage
-
05/09/2024 06:58:01 AM
rwxr-xr-x
📁
serial
-
10/21/2019 03:49:40 PM
rwxr-xr-x
📁
service_identity
-
10/21/2019 03:50:02 PM
rwxr-xr-x
📁
service_identity-16.0.0.egg-info
-
10/21/2019 03:49:23 PM
rwxr-xr-x
📁
setuptools
-
05/09/2024 06:58:03 AM
rwxr-xr-x
📁
setuptools-39.0.1.egg-info
-
05/09/2024 06:57:58 AM
rwxr-xr-x
📁
six-1.11.0.egg-info
-
10/21/2019 03:49:15 PM
rwxr-xr-x
📄
six.py
30.16 KB
09/17/2017 06:46:32 PM
rw-r--r--
📄
snack.py
30.4 KB
01/12/2018 04:42:24 PM
rw-r--r--
📁
softwareproperties
-
05/09/2024 07:14:38 AM
rwxr-xr-x
📁
sos
-
03/17/2025 09:32:20 AM
rwxr-xr-x
📄
sos-4.4.egg-info
312 bytes
11/21/2024 02:52:56 PM
rw-r--r--
📁
ssh_import_id
-
10/21/2019 03:50:07 PM
rwxr-xr-x
📁
ssh_import_id-5.7.egg-info
-
10/21/2019 03:49:39 PM
rwxr-xr-x
📁
systemd
-
10/21/2019 03:49:48 PM
rwxr-xr-x
📄
systemd_python-234.egg-info
586 bytes
08/05/2017 04:28:04 PM
rw-r--r--
📁
twisted
-
03/31/2022 06:22:38 AM
rwxr-xr-x
📁
uaclient
-
10/28/2024 08:41:34 AM
rwxr-xr-x
📁
ubuntu_pro_client-8001.egg-info
-
10/28/2024 08:41:32 AM
rwxr-xr-x
📁
ufw
-
05/09/2024 07:15:19 AM
rwxr-xr-x
📄
ufw-0.36.egg-info
261 bytes
10/25/2021 05:30:24 PM
rw-r--r--
📁
unattended_upgrades-0.1.egg-info
-
05/09/2024 07:14:27 AM
rwxr-xr-x
📁
urllib3
-
10/07/2020 06:14:10 AM
rwxr-xr-x
📁
urllib3-1.22.egg-info
-
10/07/2020 06:14:10 AM
rwxr-xr-x
📄
validate.py
46.13 KB
08/26/2014 01:11:36 AM
rw-r--r--
📁
wheel
-
05/09/2024 06:58:00 AM
rwxr-xr-x
📁
wheel-0.30.0.egg-info
-
05/09/2024 06:57:58 AM
rwxr-xr-x
📁
xdg
-
05/09/2024 06:57:59 AM
rwxr-xr-x
📁
yaml
-
10/21/2019 03:48:44 PM
rwxr-xr-x
📁
zope
-
05/09/2024 07:14:32 AM
rwxr-xr-x
📄
zope.component-4.3.0-nspkg.pth
529 bytes
02/05/2018 01:00:17 PM
rw-r--r--
📁
zope.component-4.3.0.egg-info
-
07/12/2020 04:36:15 PM
rwxr-xr-x
📄
zope.event-4.2.0-nspkg.pth
299 bytes
03/25/2016 05:44:58 PM
rw-r--r--
📁
zope.event-4.2.0.egg-info
-
07/12/2020 04:36:15 PM
rwxr-xr-x
📄
zope.hookable-4.0.4-nspkg.pth
529 bytes
02/05/2018 12:24:34 PM
rw-r--r--
📁
zope.hookable-4.0.4.egg-info
-
07/12/2020 04:36:14 PM
rwxr-xr-x
📄
zope.interface-4.3.2-nspkg.pth
529 bytes
02/04/2018 09:30:45 AM
rw-r--r--
📁
zope.interface-4.3.2.egg-info
-
05/09/2024 07:14:26 AM
rwxr-xr-x
Editing: debconf.py
Close
# Copyright: # Moshe Zadka (c) 2002 # Canonical Ltd. (c) 2005 (DebconfCommunicator) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY AUTHORS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. from __future__ import print_function import sys, os import errno import re import subprocess import fcntl class DebconfError(Exception): pass LOW, MEDIUM, HIGH, CRITICAL = 'low', 'medium', 'high', 'critical' class Debconf: """A class that speaks the debconf protocol. The simplest way to use this is as a context manager: import debconf with debconf.Debconf(run_frontend=True) as db: print(db.get('debconf/frontend')) Note that this will send the STOP command on exiting the context manager, so you shouldn't expect to be able to use the same frontend again after this. If you need to do that, then you should instantiate the class directly instead: import debconf db = debconf.Debconf(run_frontend=True) print(db.get('debconf/frontend')) """ def __init__(self, title=None, read=None, write=None, run_frontend=False): for command in ('capb set reset title input beginblock endblock go get' ' register unregister subst fset fget previous_module' ' visible purge metaget exist version settitle' ' info progress data').split(): self.setCommand(command) self.read = read or sys.stdin self.write = write or sys.stdout sys.stdout = sys.stderr if run_frontend: runFrontEnd() self.setUp(title) def setUp(self, title): self.version = self.version(2) if self.version[:2] != '2.': raise DebconfError(256, "wrong version: %s" % self.version) self.capabilities = self.capb().split() if title: self.title(title) def setCommand(self, command): setattr(self, command, lambda *args, **kw: self.command(command, *args, **kw)) def command(self, command, *params): command = command.upper() self.write.write("%s %s\n" % (command, ' '.join(map(str, params)))) self.write.flush() while True: try: resp = self.read.readline().rstrip('\n') break except IOError as e: if e.errno == errno.EINTR: continue else: raise if ' ' in resp: status, data = resp.split(' ', 1) else: status, data = resp, '' status = int(status) if status == 0: return data elif status == 1: # unescaped data unescaped = '' for chunk in re.split(r'(\\.)', data): if chunk.startswith('\\') and len(chunk) == 2: if chunk[1] == 'n': unescaped += '\n' else: unescaped += chunk[1] else: unescaped += chunk return unescaped else: raise DebconfError(status, data) def stop(self): self.write.write('STOP\n') self.write.flush() def forceInput(self, priority, question): try: self.input(priority, question) return 1 except DebconfError as e: if e.args[0] != 30: raise return 0 def getBoolean(self, question): result = self.get(question) return result == 'true' def getString(self, question): return self.get(question) def __enter__(self): return self def __exit__(self, exc_type, exc_value, exc_tb): self.stop() class DebconfCommunicator(Debconf, object): def __init__(self, owner, title=None, cloexec=False): args = ['debconf-communicate', '-fnoninteractive', owner] self.dccomm = subprocess.Popen( args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True, universal_newlines=True) super(DebconfCommunicator, self).__init__(title=title, read=self.dccomm.stdout, write=self.dccomm.stdin) if cloexec: fcntl.fcntl(self.read.fileno(), fcntl.F_SETFD, fcntl.FD_CLOEXEC) fcntl.fcntl(self.write.fileno(), fcntl.F_SETFD, fcntl.FD_CLOEXEC) def shutdown(self): if self.dccomm is not None: self.dccomm.stdin.close() self.dccomm.stdout.close() self.dccomm.wait() self.dccomm = None # Don't rely on this; call .shutdown() explicitly. def __del__(self): try: self.shutdown() except AttributeError: pass if ('DEBCONF_USE_CDEBCONF' in os.environ and os.environ['DEBCONF_USE_CDEBCONF'] != ''): _frontEndProgram = '/usr/lib/cdebconf/debconf' else: _frontEndProgram = '/usr/share/debconf/frontend' def runFrontEnd(): if 'DEBIAN_HAS_FRONTEND' not in os.environ: os.environ['PERL_DL_NONLAZY']='1' os.execv(_frontEndProgram, [_frontEndProgram, sys.executable]+sys.argv) if __name__ == '__main__': runFrontEnd() db = Debconf() db.forceInput(CRITICAL, 'bsdmainutils/calendar_lib_is_not_empty') db.go() less = db.getBoolean('less/add_mime_handler') aptlc = db.getString('apt-listchanges/email-address') db.stop() print(db.version) print(db.capabilities) print(less) print(aptlc)