All these variants are somewhat non-deterministic. You don't really know when your command will be executed and error handling is not easy.
tests/raster/test: halrun = subprocess.Popen(["halrun", "-Is", "raster.hal"], stdin=subprocess.PIPE)
src/emc/usr_intf/stepconf/stepconf.py: self.halrun = halrun = os.popen("halrun -Is", "w")
src/emc/usr_intf/stepconf/stepconf.py: self.halrun = halrun = os.popen("halrun -Is", "w")
src/emc/usr_intf/pncconf/pncconf.py: halrun = os.popen("halrun -Is > /dev/null", "w")
src/emc/usr_intf/pncconf/pncconf.py: halrun = subprocess.Popen("halrun -I", shell=True,stdin=subprocess.PIPE,stdout=subprocess.PIPE, encoding='utf-8' )
src/emc/usr_intf/pncconf/tests.py: halrun = os.popen("halrun -Is > /dev/null", "w")
src/emc/usr_intf/pncconf/tests.py: self.halrun = halrun = os.popen("halrun -Is > /dev/null", "w")
src/emc/usr_intf/pncconf/tests.py: self.halrun = halrun = os.popen("halrun -Is > /dev/null", "w")
src/emc/usr_intf/pncconf/tests.py: self.halrun = os.popen("halrun -Is > /dev/null", "w")
src/emc/usr_intf/pncconf/tests.py: a = os.popen("halrun -U > /dev/null", "w")
src/emc/usr_intf/pncconf/tests.py: a = os.popen("halrun -U > /dev/null", "w")
...
src/hal/user_comps/gladevcp.py:
cmd = ["haltcl", opts.halfile]
else:
cmd = ["halcmd", "-f", opts.halfile]
res = subprocess.call(cmd, stdout=sys.stdout, stderr=sys.stderr)
src/emc/usr_intf/gscreen/gscreen.py: res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd", "-i", inifile, "-f", f])
src/emc/usr_intf/touchy/touchy.py: res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd", "-f", "touchy.hal"])
src/emc/usr_intf/touchy/touchy.py: res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd", "-i", inifile, "-f", f])
src/emc/usr_intf/axis/scripts/axis.py: cmd = "halcmd loadusr -Wn {0} gladevcp -c {0}".format(gladename).split()
src/emc/usr_intf/axis/scripts/axis.py: res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd", "-i", vars.emcini.get(), "-f", f])
src/emc/usr_intf/axis/scripts/axis.py: res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd"] + f.split())
src/emc/usr_intf/mdro/mdro.py: halcmd_args = ["halcmd", "-V", "-i", args.ini, "-f", f]
src/emc/usr_intf/mdro/mdro.py: print("halcmd", halcmd_args)
src/emc/usr_intf/mdro/mdro.py: halcmd_args = ["halcmd", "-i", args.ini, "-f", f]
src/emc/usr_intf/mdro/mdro.py: res = os.spawnvp(os.P_WAIT, "halcmd", halcmd_args)
src/emc/usr_intf/gmoccapy/gmoccapy.py: res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd", "-i", inifile, "-f", f])
src/emc/usr_intf/gmoccapy/gmoccapy.py: res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd"] + f.split())
src/emc/usr_intf/qtvcp/qtvcp.py: cmd = ["halcmd", "-f", opts.halfile]
src/emc/usr_intf/qtvcp/qtvcp.py: res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd", "-i",self.inipath,"-f", f])
src/emc/usr_intf/qtvcp/qtvcp.py: res = os.spawnvp(os.P_WAIT, "halcmd", ["halcmd"] + f.split())
...
would look much nicer and also be deterministic.
Just an idea for now to park here. Nothing urgent.
Many python tools use either
subprocess.Popen(["halrun", "-Is", "raster.hal"], stdin=subprocess.PIPE)/os.popen("halrun -Is > /dev/null", "w"),os.spawnvp(os.P_WAIT, "halcmd", ["halcmd", "-f", "touchy.hal"])or something similar to do hal commands.All these variants are somewhat non-deterministic. You don't really know when your command will be executed and error handling is not easy.
Some grep'ing:
Using something like:
would look much nicer and also be deterministic.
Just an idea for now to park here. Nothing urgent.