Python subprocess.getoutput function

Source: Internet
Author: User
Tags string format python subprocess

devices = Subprocess.getoutput ('ios-deploy-c')print(Devices)

In the code above, the Subprocess.getoutput function obtains the results of the shell Terminal command execution in Linux, saves it in string format to devices;subprocess and other functions, interacts with the shell terminal, and uses it later to add, The output is as follows

['[...] Waiting up to 5 seconds for IOS device to be connected'"[....] Found 26b58f4034c7cabd1b34a7fbb8exxxxxxx (N71map, IPhone 6s, Iphoneos, arm64) a.k.a. ' iphone6s ' connected through usb."]

Python subprocess.getoutput function

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.