django_ocr_server/utils.py
def cmd_stdin(cmd, stdin):
    """
    It launches command 'cmd' and sends it to the standard input 'stdin'. 2019-03-10
    :param cmd: an array of command e.g. ['tesseract','-l','rus+eng','-','-']
    :param stdin: a content to send to the standart input of a command
    :return: the decoded stdout of result of command
    """
    popen = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
    return popen.communicate(input=stdin)[0]

    It launches command 'cmd' and sends it to the standard input 'stdin'. 2019-03-10
    :param cmd: an array of command e.g. ['tesseract','-l','rus+eng','-','-']
    :param stdin: a content to send to the standart input of a command
    :return: the decoded stdout of result of command
    
It launches command 'cmd' and sends it to the standard input 'stdin'.
It launches command ' cmd ' and sends it to the standard input ' stdin ' .
def cmd_stdin(cmd, stdin):
    popen = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
    return popen.communicate(input=stdin)[0]
def cmd_stdin ( cmd , stdin ) : popen = subprocess . Popen ( cmd , stdout = subprocess . PIPE , stderr = subprocess . PIPE , stdin = subprocess . PIPE ) return popen . communicate ( input = stdin ) [ 0 ]
It launches command 'cmd' and sends it to the standard input 'stdin'.
It launches command ' cmd ' and sends it to the standard input ' stdin ' .
"""
    It launches command 'cmd' and sends it to the standard input 'stdin'. 2019-03-10
    :param cmd: an array of command e.g. ['tesseract','-l','rus+eng','-','-']
    :param stdin: a content to send to the standart input of a command
    :return: the decoded stdout of result of command
    """
the decoded stdout of result of command
the decoded stdout of result of command
cmd
an array of command e.g.
an array of command e . g .
stdin
a content to send to the standart input of a command
a content to send to the standart input of a command