Dependencies¶
Install Python in macOS
There are a few ways to install Python in Mac.
-
Install system-wide via the official Python installation package.
-
Install a Anaconda Python distribution locally.
-
Install locally using Homebrew (recommended).
A few comments about different ways of installation.
-
Avoid installing multiple versions of Python in your system. It usually brings more …
GitHub API
Python Bindings - ghapi¶
ghapi provides 100% always-updated coverage of the entire GitHub REST API by automatically converting the OpenAPI spec to a Pythonic API. ghapi is always up to date with the latest changes to GitHub APIs.
Hands on the Python Library pexpect
Tips and Traps¶
The command-line tool of some (e.g., network) applications might be slow to authenticate. If you use pexect to automate such a command-line tool, it is best to wait for sometime after sending password using
child.sendline(passwd)
. If the authentication has ouput on both success and failure, a smart way is to wait for the success or failure message to come out.
IPython Is the Best Shell
IPython is the Best Shell!
-
Use IPython as much as possible.
- IPython has virtues of both shell and Python.
- You should avoid using shell scripts for complicate tasks any way.
-
If you do want to use a Unix/Linux shell, I'd suggest you stick to Bash unless Linux distributions start …