Decode PowerShell output possibly containing non-ASCII Unicode characters into a Python string

前端 未结 2 1097
南方客
南方客 2020-11-29 12:54

I need to decode PowerShell stdout called from Python into a Python string.

My ultimate goal is to get in a form of a list of strings the names of network adapters o

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-29 13:06

    It's a Python 2 bug already marked as wontfix: https://bugs.python.org/issue19264

    I must use Python 3 if you want to make it work under Windows.

提交回复
热议问题