Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

Pythonにはclickというコマンドラインパーサとして使えるライブラリがあります。同様のライブラリとして以前からargparseがありますが、clickはargparseよりももっと簡単に使えるライブラリです。 clickでコマンドラインパーサを書く例は以下になります。 # main.py import click @click.command() @click.option( "--count", type=int, default=1, required=True, help="Number of greetings.", ) @click.option( "--name", type=str, default="Your name", required=True, help="The person to greet.", ) def hello( count: int, name
VSCodeのPython拡張機能が更新されたと発表され、Jupyter Notebookの扱いが便利になったようなので確認してみました。 要約 VSCode上でPythonコード(拡張子.py)を#%%の区切り単位で実行できる 実行結果はコードと合わせてJupyter Notebook形式(拡張子.ipynb)で出力できる 逆に既に作成されたJupyter Notebook形式のファイルを#%%で区切られたPythonコードに変換することもできる つまりVSCodeのみでJupyter Notebookの新規作成や既存ファイルの編集を完結させられる 環境 OS : Windows10 (10.0.17134) Visual Studio Code : 1.28.2 VSCodeのPython拡張機能 : 2018.10.1 python : 3.6.6 jupyter : 1.0.0 j
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く