Python module to shellquote/unshellquote? [duplicate]
Looks like try: # py3 from shlex import quote except ImportError: # py2 from pipes import quote quote(“hello stack overflow’s quite cool”) >>> ‘”hello stack overflow\’s quite cool”‘ gets me far enough.