Results of 1 - 10 of about 48 for root (0.008 sec.)
- xml.etree.ElementTree --- ElementTree XML API 12601
- xml.etree.ElementTree --- ElementTree XML API Source code: Lib/xml/etree/ElementTree.py xml.etree.ElementTree モジュールは、XML データの解析と作成を行うシンプルで効率的な API を実装しています。 バージョン 3.3 で変更: このモジュールは利用出来
...ことでこのデータをインポートすることが出来ます: import xml.etree.ElementTree as ET tree = ET . parse ( 'country_data.xml' ) root = tree . getroot () 文字列から直接インポートすることも出来ます: root = ET . fromstring ( country_data_as_string ) fromstri...ト要素です。他のパース関数は ElementTree を作成するかもしれません。ドキュメントをきちんと確認してください。 Element として、 root はタグと属性の辞書を持ちます: >>> root . tag 'data' >>> root . attrib {} さらにイテレート可能な子ノードも持ちます: >>> for...child in root : ... print ( child . tag , child . attrib ) ... country {'name': 'Liechtenstein'} country {'name': 'Singapore'} country {... - https://man.mtool.work/python/3.14/library/xml.etree.elementtree.html
- Logging クックブック 12071
- Logging クックブック Author : Vinay Sajip <vinay_sajip at red-dove dot com> このページは、過去に有用であるとされていた、logging に関連するいくつものレシピを含んでいます。チュートリアルやリファレンス情報へのリンクについては その他のリソース
....' ) logger2 . error ( 'The five boxing wizards jump quickly.' ) これを実行すると、コンソールには以下のように出力されます: root : INFO Jackdaws love my big sphinx of quartz. myapp.area1 : INFO How quickly daft jumping zebras vex. myapp.area2 : WARNIN...myapp.area2 : ERROR The five boxing wizards jump quickly. そして、ファイルには以下のように出力されるはずです: 10-22 22:19 root INFO Jackdaws love my big sphinx of quartz. 10-22 22:19 myapp.area1 DEBUG Quick zephyrs blow, vexing daft Jim. 10-22 22:19...derr" }, "file" : { "class" : "logging.FileHandler" , "formatter" : "simple" , "filename" : "app.log" , "mode" : "w" } }, "root" : { "level" : "DEBUG" , "handlers" : [ "stderr" , "stdout" , "file" ] } } This configuration does almost what we want, ex... - https://man.mtool.work/python/3.14/howto/logging-cookbook.html
- ensurepip --- pip インストーラーのブートストラップ 10708
- ensurepip --- pip インストーラーのブートストラップ Added in version 3.4. ソースコード: Lib/ensurepip ensurepip パッケージは、既存の Python 環境や仮想環境に pip インストーラーをブートストラップする機能を提供します。 この方式は、 pip が独自の
...しアクティブな仮想環境がなければ)にインストールされます。インストール先は2つの追加コマンドラインオプションで制御できます: --root <dir> 現在有効な仮想環境があればそのルート、なければ現在の Python のデフォルトのルートではなく、指定されたルートディレクト...ートストラップする際にインストールされることになる利用可能な pip のバージョンを示す文字列を返します。 ensurepip. bootstrap ( root = None , upgrade = False , user = False , altinstall = False , default_pip = False , verbosity = 0 ) 現在の環境あるいは指示...された環境へ pip をブートストラップします。 root で、インストールの root ディレクトリを変更します。 root が None の場合は、インストールは現在の環境でのデフォルトの場所を使... - https://man.mtool.work/python/3.14/library/ensurepip.html
- shutil --- 高水準のファイル操作 10511
- shutil --- 高水準のファイル操作 ソースコード: Lib/shutil.py shutil モジュールは、ファイルやファイルの集合に対するさまざまな高水準の操作を提供します。 特に、ファイルのコピーや削除を行う関数が用意されています。 個々のファイルを操作する場合は
...ィも提供されています。これらは zipfile 、 tarfile モジュールに依拠しています。 shutil. make_archive ( base_name , format [ , root_dir [ , base_dir [ , verbose [ , dry_run [ , owner [ , group [ , logger ] ] ] ] ] ] ] ) アーカイブファイル (zip や tar) を...場合)、"xztar" ( lzma モジュールを利用できる場合)、"zstdtar" ( compression.zstd モジュールを利用できる場合) のいずれかです。 root_dir is a directory that will be the root directory of the archive, all paths in the archive will be relative to it; for ex...ample, we typically chdir into root_dir before creating the archive. base_dir is the directory where we start archiving from; i.e. base_dir will be the common... - https://man.mtool.work/python/3.14/library/shutil.html
- glob --- Unix 形式のパス名のパターン展開 10299
- glob --- Unix 形式のパス名のパターン展開 ソースコード: Lib/glob.py glob モジュールは、Unix シェルに似たパターンマッチの規則を使ってパス名を探します。 チルダ展開は行いませんが、 * 、 ? 、 [] で表す文字の範囲は正しくマッチします。 実際にサブシ
...ください。例えば、 '[?]' は文字 '?' にマッチします。 glob モジュールは次の関数を定義しています。 glob. glob ( pathname , * , root_dir = None , dir_fd = None , recursive = False , include_hidden = False ) パスの仕様を含む文字列 pathname にマッチするパス...がこの関数の呼び出し中に追加または削除された場合、それらのファイルに対するパス名が結果に含まれるかどうかはの動作は不定です。 root_dir が None でない場合は、検索のルートディレクトリを指定する path-like object でなければなりません。 glob() の呼び出し前に...カレントディレクトリを変更するのと同じ効果があります。 pathname が相対パスの場合、結果には root_dir からの相対パスが含まれます。 この関数は dir_fd パラメタで ディレクトリ記述子への相対パス をサポートしています。 recurs... - https://man.mtool.work/python/3.14/library/glob.html
- tkinter.font --- Tkinter フォントラッパー 10193
- tkinter.font --- Tkinter フォントラッパー ソースコード: Lib/tkinter/font.py tkinter.font モジュールは、名前付きフォントの作成と利用のために Font クラスを提供します。 フォントの太さと傾きには次の種類があります: tkinter.font. NORMAL tkinter.f
...ont. BOLD tkinter.font. ITALIC tkinter.font. ROMAN class tkinter.font. Font ( root = None , font = None , name = None , exists = False , ** options ) Font クラスは名前付きフォントを表します。 Font インスタ...e font that ensures no vertical overlap between lines. fixed - 固定幅フォントなら 1、それ以外は 0 tkinter.font. families ( root = None , displayof = None ) 利用できるフォントファミリーの名前のタプルを返します。 tkinter.font. names ( root = None ) 定義...されているすべてのフォントの名前のタプルを返します。 tkinter.font. nametofont ( name , root = None ) 既存の名前付きフォント name を表す Font を返します。 root は、そのフォントを所有する Tcl インタープリタのウィジェ... - https://man.mtool.work/python/3.14/library/tkinter.font.html
- pathlib --- オブジェクト指向のファイルシステムパス 9148
- pathlib --- オブジェクト指向のファイルシステムパス Added in version 3.4. ソースコード: Lib/pathlib/ このモジュールはファイルシステムのパスを表すクラスを提供していて、様々なオペレーティングシステムについての適切な意味論をそれらのクラスに持た
...'' UNC 共有名もドライブとみなされます: >>> PureWindowsPath ( '//host/share/foo.txt' ) . drive '\\\\host\\share' PurePath. root ローカルまたはグローバルルートを表す文字列があればそれになります: >>> PureWindowsPath ( 'c:/Program Files/' ) . root '\\'...>>> PureWindowsPath ( 'c:Program Files/' ) . root '' >>> PurePosixPath ( '/etc' ) . root '/' UNC 共有名は常にルートを持ちます: >>> PureWindowsPath ( '//host/share' ) . root...Path でパスの先頭が3つ以上の連続したスラッシュである場合、 余分なスラッシュは除去されます: >>> PurePosixPath ( '//etc' ) . root '//' >>> PurePosixPath ( '///etc' ) . root '/' >>> PurePosixPath ( '////etc' ) . root '/' 注釈 この挙動は、以下に示す、 Th... - https://man.mtool.work/python/3.14/library/pathlib.html
- os.path --- 一般的なパス名操作 8724
- os.path --- 一般的なパス名操作 ソースコード: Lib/genericpath.py , Lib/posixpath.py (POSIX) 、 Lib/ntpath.py (Windows) 。 このモジュールはパス名を扱う際に便利な関数を実装しています。ファイルの読み書きをする際は open() を、ファイルシステムにア
...nux systems, it will always return True for btrfs subvolumes, even if they aren't mount points. On Windows, a drive letter root and a share UNC are always mount points, and for any other path GetVolumePathName is called to see if it is different from...er/dir" ) ("//host/computer", "/dir") バージョン 3.6 で変更: path-like object を受け入れるようになりました。 os.path. splitroot ( path , / ) パス名 path を 3 要素のタプル (drive, root, tail) に分割します。 drive はデバイス名またはマウントポイント、 r...区切り文字の文字列、 tail はルートより後のすべての部分です。 どの要素も空文字列になる場合があります。 いずれの場合も drive + root + tail は path と同じになります。 POSIX システムでは drive は常に空です。 root は、空 ( path が相対パスの場合)、1 つのスラ... - https://man.mtool.work/python/3.14/library/os.path.html
- tkinter.ttk --- Tk のテーマ付きウィジェット 8724
- tkinter.ttk --- Tk のテーマ付きウィジェット ソースコード: Lib/tkinter/ttk.py tkinter.ttk モジュールは、Tk 8.5 で導入されたテーマ付きウィジェット群を提供します。 外観が固定されている従来の tkinter ウィジェットと異なり、プラットフォームのネイ
...のボタンをパディングのある平らな見た目にし、背景の色を変更するには以下のようにします: from tkinter import ttk import tkinter root = tkinter . Tk () ttk . Style () . configure ( "TButton" , padding = 6 , relief = "flat" , background = "#ccc" ) btn = ttk.... Button ( text = "Sample" ) btn . pack () root . mainloop () map ( style , query_opt = None , ** kw ) style の指定されたオプションの動的な値を問い合わせたり、設定したりし...くは複数の状態と値の組み合わせです。 以下のように、例を示す方がわかりやすいでしょう: import tkinter from tkinter import ttk root = tkinter . Tk () style = ttk . Style () style . map ( "C.TButton" , foreground = [( 'pressed' , 'red' ), ( 'active' , 'bl... - https://man.mtool.work/python/3.14/library/tkinter.ttk.html
- デスクリプタ ガイド 8421
- デスクリプタ ガイド Author : Raymond Hettinger Contact : <python at rcn dot com> デスクリプタ を使うと、オブジェクトの属性の検索、保存、削除をカスタマイズできます。 本ガイドは4つの大項目から構成されています。 最初の「入門」では基本の紹介をし
...ますが、通常の属性の name はログ出力されません。 >>> mary = Person ( 'Mary M' , 30 ) # 年齢の初期設定がログに記録される INFO:root:Updating 'age' to 30 >>> dave = Person ( 'David D' , 40 ) INFO:root:Updating 'age' to 40 >>> vars ( mary ) # 実際のデータは...'_age': 30} >>> vars ( dave ) {'name': 'David D', '_age': 40} >>> mary . age # データを取得し、そのアクセスを記録する INFO:root:Accessing 'age' giving 30 30 >>> mary . birthday () # 更新もログに記録される INFO:root:Accessing 'age' giving 30 INFO:root...age' to 31 >>> dave . name # 通常の属性の検索は記録されない 'David D' >>> dave . age # 管理された属性だけが記録される INFO:root:Accessing 'age' giving 40 40 このサンプル実装には大きな問題があります。プライベートな名前の _age が LoggedAgeAccess クラス... - https://man.mtool.work/python/3.14/howto/descriptor.html