python使用subprocess查看进程并过滤
来源: https://stackoverflow.com/questions/6780035/how-to-run-ps-cax-grep-something-in-python
将proc1的输出当作proc2的输入来实现
1 | import subprocess |
来源: https://stackoverflow.com/questions/6780035/how-to-run-ps-cax-grep-something-in-python
将proc1的输出当作proc2的输入来实现
1 | import subprocess |
首先需要安装pip模块,如果yum中没有,则需要用 get-pip.py安装
sudo python get-pip.py
安装
sudo pip install web.py
1 | wget http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.0.11.zip |
1 | sudo pip install python-tds |
sudo pip install pinyin4py
这样安装之后不会与之前的python2.6版本有冲突,3.x版本同理
1 | wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz |
原文 https://developers.google.com/drive/v3/web/quickstart/python
pip install --upgrade google-api-python-client
谷歌上的步骤:
1 | Use this wizard to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue, then Go to credentials. |
内容大概如下
1 | {"installed":{"client_id":"334720361216-xxxxx.apps.googleusercontent.com","project_id":"analog-fastness-167807","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://accounts.google.com/o/oauth2/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"xxxxxx","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}} |
1 | #!/usr/bin/env python |