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
  • 19,440
  • 34
  • 112
  • 219

2 Answers2

3

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

Community
  • 1
  • 1
Roberto
  • 11,557
  • 16
  • 54
  • 68
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
  • 601,492
  • 42
  • 1,072
  • 1,490