Unverified details These details have not been verified by PyPI Project links Changelog Documentation Homepage Issue Tracker Repository Meta License Expression: BSD-3-Clause SPDX License Expression Author: Manfred Stienstra, Yuri Takhteyev Maintainer: Isaac Muse Tags markdown , markdown-parser , python-markdown , markdown-to-html Requires: Python >=3.10 Provides-Extra: testing , docs Python-Markdo
ページコンテンツ contextlib – コンテキストマネージャユーティリティ コンテキストマネージャ API ジェネレータからコンテキストマネージャへ ネストされたコンテキスト オープンハンドラをクローズする ナビゲーション コンテンツテーブル 前: atexit – プログラムの終了時に関数を呼び出す 次: gc – Garbage Collector This Page Show Source サンプルプログラム PyMOTW の全てのサンプルプログラムの出力は、 注記されていない限りは Python 2.7.2 で生成されています。 標準ライブラリの初期のバージョンでは利用できない機能も紹介している 可能性があります。
optparseからargparseに変更。 1 tonicdnscli のPython 3への対応をしようとした際、コマンドラインオプションに使用している optparseモジュールがPython 2.7 で廃止予定だということを知りました。そこで、optparseからargparseに変更することにしました。optparseでは、入力ファイルをJSON形式で表示させるためのオプションや、TonicDNSからレコードを取得して表示、レコードの登録、レコードの削除を行うのをオプションで行っていましたが、argparseに変更するタイミングで、これらをサブコマンドとして実装しなおしました。変更した結果が下記の表です。 機能 optparse argparse 変換・表示 -o/–stdout show 取得表示 -g/–retrieve get レコード登録 -c/–create creat
Unverified details These details have not been verified by PyPI Project links Changelog Documentation Issue Tracker Sources Meta License Expression: MIT SPDX License Expression Author: Marc Schlaich Maintainer: Ionel Cristian Mărieș Tags cover , coverage , distributed , parallel , py.test , pytest Requires: Python >=3.9 Provides-Extra: testing Classifiers Development Status 5 - Production/Stable F
pytest: helps you write better programs¶ The pytest framework makes it easy to write small, readable tests, and can scale to support complex functional testing for applications and libraries. pytest requires: Python 3.7+ or PyPy3. PyPI package name: pytest A quick example¶ # content of test_sample.py def inc(x): return x + 1 def test_answer(): assert inc(3) == 5 $ pytest ==========================
CrunchyFrog -- A cross-platform SQL client. =========================================== CrunchyFrog is a cross-platform SQL client for a variety of database systems. Running CrunchyFrog ------------------- You can run CrunchyFrog from this directory without installing: ./crunchyfrog The next thing is to define some datasources by opening the Datasource manager (Edit > Data Source Manager). See htt
Mac OS X 10.6.3 で Skype4Py を使いたいんだけど、Segmentation fault が発生する。 と思ったら、ドンピシャな方が。 Skype4Pyがsegmentation fault する - mfumiの日記 なるほど、python を 32bit アプリケーションとして起動してやればいいのか。 ただ自分は Mac デフォルトの Python は使わずに、Macports で複数バージョンの Python を入れて、virtualenv で必要な環境をその都度作ったり、切り替えてる。 $ port installed | grep python python24 @2.4.6_4+darwin+darwin_10+macosx (active) python25 @2.5.4_9+darwin+darwin_10+macosx (active) python
一部で最強と呼ばれているPythonには, virtualenvやipythonのような絶対入れる超定番以外にも, あると便利なライブラリというものがあります. ここではラッキーセブン, 7つご紹介しましょう. なお, furl以外は3.xに対応しています. requests 覚えやすいWebリクエスト(urllib.request.urlopenの代替) furl URLの扱いをもっとシンプルに(urllib.parse.urlparseの代替) PyQuery jQueryのスクレイピング力をPythonに(html.parser.HTTPParser, lxml, BeautifulSoupの代替) Send2Trash/Send2Trash3k クロスプラットフォームな「ごみ箱へ送る」 Windows向けPythonランチャー 2.xと3.xを切り替える PySide/PyQt4
仕事してるとテストデータを作ったり、またはシステムのデータをダウンロードさせたりとかで、結構csvやxls形式を使います そんなときに便利そうなライブラリがあったのでちょっと試して見ました tablib https://github.com/kennethreitz/tablib document http://docs.python-tablib.org/en/latest/index.html インストール pip install tablib 使い方 新しくデータを作成する # ヘッダ import tablib headers = ('名字', '名前') # データ data = [('東方','仗助'), ('虹村', '億泰')] # 表データの作成 data = tablib.Dataset(*data, headers=headers) # 行を追加 data.appen
みんなのIoT/みんなのPythonの著者。二子玉近く160平米の庭付き一戸建てに嫁/息子/娘/わんこと暮らしてます。月間1000万PV/150万UUのWebサービス運営中。 免責事項 プライバシーポリシー parseはPython用の文字列パーサライブラリ。「pip install parse」でインストールするだけで使える。 プレースホルダ「{}」を使ってパターンを与えると,任意の文字列の中から文字列を切り出すことができる。githubにあるサンプルコードを見てみよう。 >>> from parse import * >>> r = parse("It's {}, I love it!", "It's spam, I love it!") >>> print r <Result ('spam',) {}> >>> r[0] 'spam' >>> age = search('Age: {
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く