I made a python code which executes polygon.exe program like this:
import os
makecommand = "polygon -e 25 -l 25 pri 6 > hexagon.off"
os.system(makecommand)
Then black cmd window pops up which implies that the polygon.exe program is working well. Now, I want to hide the black cmd window that pops up when I run the python code.
I also tried using subprocess like this,
import subprocess
makecommand = "polygon -e 25 -l 25 pri 6 > hexagon.off"
subprocess.run(makecommand)
but then the polygon.exe program was not executed and the wanted hexagon.off file was missing.
Is there any way to hide the black cmd window popping up in Python when programs are executed? (For your information, polygon.exe program is a part of Antiprism project.)