Skip to content

Instantly share code, notes, and snippets.

Brent Baude baude

  • Red Hat
Block or report user

Report or block baude

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View podman_tty.py
import socket, argparse
import select, sys, os, tty, atexit, termios, signal, shutil
import fcntl, termios, struct
# Create the socket
sock = socket.socket(socket.AF_UNIX, socket.SOCK_SEQPACKET)
# parsing args for using this as a cli .... dwalsh hates the idea so you can
# nuke this when folding into the mix
View podman_tty.py
import socket, argparse
import select, sys, os, tty, atexit, termios, signal, shutil
import fcntl, termios, struct
#hasVarlink = False
#try:
# from varlink import (Client, VarlinkError)
# hasVarlink = True
#except ImportError:
View podman_tty.py
import socket, argparse
import select, sys, os, tty, atexit, termios, signal, shutil
import fcntl, termios, struct
hasVarlink = False
try:
import abcd1234
from varlink import (Client, VarlinkError)
hasVarlink = True
except ImportError:
View podman_tty.py
import socket, argparse
import select, sys, os, tty, atexit, termios, signal, shutil
import fcntl, termios, struct
hasVarlink = False
try:
import foobar1234
from varlink import (Client, VarlinkError)
hasVarlink = True
except ImportError:
View podman_tty.py
import socket, argparse
import select, sys, os, tty, atexit, termios, signal, shutil
import fcntl, termios, struct
hasVarlink = False
try:
from varlink import (Client, VarlinkError)
hasVarlink = True
except ImportError:
pass
View podman_tty.py
import socket, argparse
import select, sys, os, tty, atexit, termios, signal, shutil
import fcntl, termios, struct
hasVarlink = False
try:
from varlink import (Client, VarlinkError)
hasVarlink = True
except ImportError:
pass
View podman_tty.py
import socket, argparse
import select, sys, os, tty, atexit, termios, signal, shutil
import fcntl, termios, struct
hasVarlink = False
try:
from varlink import (Client, VarlinkError)
hasVarlink = True
except ImportError:
pass
View podman_tty.py
import socket, argparse
import select, sys, os, tty, atexit, termios, signal, shutil
hasVarlink = False
try:
import fiibar
from varlink import (Client, VarlinkError)
hasVarlink = True
except ImportError:
pass
View podman_tty.py
import socket
import select, sys, os, tty, atexit, termios
sock = socket.socket(socket.AF_UNIX, socket.SOCK_SEQPACKET)
# stdin 1
# stdout 2
# stderr 3
def reset_fd(my_fd, old_settings):
termios.tcsetattr(my_fd, termios.TCSADRAIN, old_settings)
You can’t perform that action at this time.