Post

Replies

Boosts

Views

Activity

Reply to 'xcrun xctrace list devices' gives list of devices info in stderr - Python
I was trying to get the information of all ios real devices (connected to my machine) and also the simulators. import subprocess def getdeviceinfo(self): alldevicesinfo = subprocess.run(['xcrun', 'xctrace', 'list', 'devices'], stdout=subprocess.PIPE).stdout.decode( 'utf-8') The above process gives me the o/p as an empty string but, gives the expected information in stderr (in the error) Try the below code: alldevicesinfo = subprocess.run(['xcrun', 'xctrace', 'list', 'devices'], stderr=subprocess.PIPE).stderr.decode( 'utf-8')
Oct ’20