equal
deleted
inserted
replaced
641 res += ((target_fname, open(target_path, "rb")),) |
641 res += ((target_fname, open(target_path, "rb")),) |
642 |
642 |
643 svghmi_cmds = {} |
643 svghmi_cmds = {} |
644 for thing in ["Start", "Stop", "Watchdog"]: |
644 for thing in ["Start", "Stop", "Watchdog"]: |
645 given_command = self.GetParamsAttributes("SVGHMI.On"+thing)["value"] |
645 given_command = self.GetParamsAttributes("SVGHMI.On"+thing)["value"] |
|
646 args = shlex.split(given_command.format(**svghmi_options)) |
646 svghmi_cmds[thing] = ( |
647 svghmi_cmds[thing] = ( |
647 "Popen(" + |
648 "Popen(" + |
648 repr(shlex.split(given_command.format(**svghmi_options))) + |
649 repr(args) + |
649 ")") if given_command else "None # no command given" |
650 ")") if args else "None # no command given" |
650 |
651 |
651 runtimefile_path = os.path.join(buildpath, "runtime_%s_svghmi_.py" % location_str) |
652 runtimefile_path = os.path.join(buildpath, "runtime_%s_svghmi_.py" % location_str) |
652 runtimefile = open(runtimefile_path, 'w') |
653 runtimefile = open(runtimefile_path, 'w') |
653 runtimefile.write(""" |
654 runtimefile.write(""" |
654 #!/usr/bin/env python |
655 #!/usr/bin/env python |