def comapre_show(): import subprocess left = form.getvalue('left') right = form.getvalue('right') cmd='diff -ub %s%s %s%s' % (hap_configs_dir, left, hap_configs_dir, right) output, stderr = funct.subprocess_execute(cmd) funct.compare(output) print(stderr)
def comapre_show(): import subprocess left = form.getvalue('left') right = form.getvalue('right') haproxy_configs_server = funct.get_config_var('configs', 'haproxy_configs_server') cmd='diff -ub %s%s %s%s' % (hap_configs_dir, left, hap_configs_dir, right) p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, universal_newlines=True) stdout, stderr = p.communicate() output = stdout.splitlines() funct.compare(output) print(stderr)