gv2gxl, gxl2gv do not behave correctly when called via absolute or relative path
Steps to reproduce
gv2gxl = shutil.which("gv2gxl")
print(gv2gxl) # prints C:/Graphviz/bin/gv2gxl.EXE
subprocess.check_call([gv2gxl, …])
Expected Behaviour
gv2gxl translates Graphviz to GXL.
Actual Behaviour
gv2gxl fails to set a mode and falls back on gxl2gv behavior.
OS Version
Windows in Graphviz CI.
Graphviz Version
Additional info
The problem seems to be that it looks at argv[0]
to decide how to behave and does not anticipate finding an absolute or relative path here. It then falls back on examining the file extension of its inputs, which also fails if its input is being piped into it.