※基本、Python3前提。
https://docs.python.org/ja/3/library/os.html
ファイル名、コマンドライン引数、環境変数など
https://docs.python.org/ja/3/library/os.html#os.getenv
os.getenv(key, default=None)
https://docs.python.org/ja/3/library/os.path.html
パス名操作
>>> os.path.join('/', 'usr', 'local', 'bin')
'/usr/local/bin'
https://docs.python.org/ja/3/library/pprint.html
Rubyの pp
的なもの。
https://docs.python.org/ja/3/library/re.html
正規表現操作モジュール。
See also 道場#正規表現
RegexFlagのインスタンス(Python v3.6〜)
flag | 機能 |
---|---|
re.I, re.IGNORECASE | 大文字・小文字を区別しない |
https://docs.python.org/ja/3/library/urllib.request.html
HTTPリクエストを送る。
使い方: https://docs.python.jp/3.6/howto/urllib2.html
https://docs.python.org/ja/3/library/venv.html
# 仮想環境の作成
python3 -m venv path/to/new_environment
# 仮想環境の利用
source path/to/new_environment/bin/activate
## module install
pip install <some_modules>
## installしたモジュールの表示
pip freeze
## 仮想環境の利用を終了
deactivate
参考: