HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/python-apt/tests/helper_install_progress_run.py
#!/usr/bin/python3
#
# Copyright (C) 2019 Colomban Wendling <cwendling@hypra.fr>
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
"""Helper checking argv[1] is a valid, writable, file descriptor"""

import os
from sys import argv

assert len(argv) == 2
with os.fdopen(int(argv[1]), "w") as f:
    assert f.write("test") == 4