(command: str, command_vars: list)
return full_command
Creates a shell command and replaces '?' with the command_vars list
Creates a shell command and replaces '?' with the command_vars list
Creates a shell command and replaces ? with the command_vars list
def create_shell_command(command: str, command_vars: list) -> 'Shell command':
    '''
    Creates a shell command and replaces '?' with the command_vars list
    '''

    transformed_vars = ["' + " + command_var_format(item) + " + '" for item in command_vars]
    new_command = command.replace("?", '{}').format(*transformed_vars)
    python_section = '''import os; import sys; os.system('{}')'''.format(new_command)
    full_command = '"{}" -c "{}" \"%1\""'.format(sys.executable, python_section)
    return full_command
def create_shell_command ( command : str , command_vars : list ) -> 'Shell command' : transformed_vars = [ "' + " + command_var_format ( item ) + " + '" for item in command_vars ] new_command = command . replace ( "?" , '{}' ) . format ( * transformed_vars ) python_section = '''import os; import sys; os.system('{}')''' . format ( new_command ) full_command = '"{}" -c "{}" \"%1\""' . format ( sys . executable , python_section ) return full_command