2

I'm trying to do the same thing as this guy right here: Cross-platform subprocess with hidden window
But my problem is that subprocess module doesn't contain STARTF_USESHOWWINDOW. If I understand good it was removed from python 2.7 and above.
What can I do so I can use it in Python 2.7 or is there an alternative to using STARTF_USESHOWWINDOW ?

Thank you.

Community
  • 1
  • 1
Adrian
  • 18,026
  • 34
  • 104
  • 199

2 Answers2

3

As mentioned here, you can use subprocess._subprocess.STARTF_USESHOWWINDOW in Python 2.7.

Community
  • 1
  • 1
Roberto
  • 11,011
  • 15
  • 53
  • 66
2

STARTF_USESHOWWINDOW is a Windows specific flag and so you can read it out of win32con. If you don't have that module installed, you can simply define it for yourself.

David Heffernan
  • 587,191
  • 41
  • 1,025
  • 1,442