0

Is it possible to control the power to a USB port using a python2.7-script?

I have tried Nolan Foster answer (https://stackoverflow.com/a/64991005/11939486), but the subprocess.run only works with python 3

Magnus
  • 83
  • 1
  • 7
  • 1
    No, subprocess also works for Python 2.7 ```Python 2.7.16 (default, Dec 21 2020, 23:00:36) [GCC Apple LLVM 12.0.0 (clang-1200.0.30.4) [+internal-os, ptrauth-isa=sign+stri on darwin Type "help", "copyright", "credits" or "license" for more information. >>> >>> import subprocess >>> ``` However, in the link it uses **subprocess.run** which is introduced in *python3* – Vikash Kumar Apr 26 '21 at 06:09
  • @vikashkumar, thanks. The question is edited. – Magnus Apr 26 '21 at 09:21

0 Answers0