skip to Main Content

Ubuntu – How to keep quotes in arguments passed to a python script when using argparse, pexpect and docker?

I'm making a python script, that wraps call to docker run by creating a child process with pexpect (pexpect is essential to me, because command might be interactive): import argparse import pexpect parser = argparse.ArgumentParser() parser.add_argument("some_positional_argument") parser.add_argument("command", nargs=argparse.REMAINDER) args =…

VIEW QUESTION
Back To Top
Search