SocketServer

Bonus: simple python socket client

Comments are moderated. It may take a few minutes before your comment appears.
Markdown is supported in your comments.

def pipe_command(arg_list, standard_input=False):
    "arg_list is [command, arg1, ...], standard_input is string"
    pipe = subprocess.PIPE if standard_input else None
    subp = subprocess.Popen(arg_list, stdin=pipe, stdout=subprocess.PIPE)
    if not standard_input:
        return subp.communicate()[0]
    return subp.communicate(standard_input)[0]
Name:
Mail: (not shown)

Please type this: