Results of 1 - 10 of about 23 for tempfile (0.005 sec.)
- tempfile --- 一時ファイルやディレクトリの作成 16069
- tempfile --- 一時ファイルやディレクトリの作成 ソースコード: Lib/tempfile.py このモジュールは一時ファイルやディレクトリを作成します。 サポートされている全てのプラットフォームで動作します。 TemporaryFile 、 NamedTemporaryFile 、 TemporaryDire
...分かりやすさのためにキーワード引数を使用してください。 このモジュールではユーザが呼び出し可能な以下の項目を定義しています: tempfile. TemporaryFile ( mode = 'w+b' , buffering = -1 , encoding = None , newline = None , suffix = None , prefix = None , dir =...が Posix でも Cygwin でもない場合は、TemporaryFile は NamedTemporaryFile の別名です。 引数 fullpath を指定して 監査イベント tempfile.mkstemp を送出します。 バージョン 3.5 で変更: 利用可能であれば os.O_TMPFILE フラグが使用されます。 バージョン 3.8 で変更:...errors 引数が追加されました。 tempfile. NamedTemporaryFile ( mode = 'w+b' , buffering = -1 , encoding = None , newline = None , suffix = None , prefix = None , d... - https://man.mtool.work/python/3.14/library/tempfile.html
- email: 使用例 8797
- email : 使用例 ここでは email パッケージを使って電子メールメッセージを読む・書く・送信するいくつかの例を紹介します。より複雑な MIME メッセージについても扱います。 まず、単純なテキストメッセージを作成して送信する方法を見てみましょう (テキスト
...ge ( msg ) 前の例のメッセージが送信されてきたら、これを処理する方法の一つは次のようなものです: import os import sys import tempfile import mimetypes import webbrowser # 必要な email モジュールをインポートします from email import policy from email.parser...splitext ( part . get_filename ())[ 1 ] else : extension = mimetypes . guess_extension ( part . get_content_type ()) with tempfile . NamedTemporaryFile ( suffix = extension , delete = False ) as f : f . write ( part . get_content ()) # ここでも <> を除い...]] = f . name else : print ( "Don't know how to display {} " . format ( richest . get_content_type ())) sys . exit () with tempfile . NamedTemporaryFile ( mode = 'w' , delete = False ) as f : f . write ( magic_html_parser ( body . get_content (), partfil... - https://man.mtool.work/python/3.14/library/email.examples.html
- 監査イベント表 8680
- 監査イベント表 この表は、 CPython ランタイムと標準ライブラリ全体で sys.audit() または PySys_Audit() の呼び出しによって送出されるすべてのイベントを含んでいます。これらの呼び出しは、 3.8 以降に追加されました ( PEP 578 を参照) 。 これらのイベン
...log [1] syslog.openlog ident , logoption , facility [1] syslog.setlogmask maskpri [1] syslog.syslog priority , message [1] tempfile.mkdtemp fullpath [1] [2] tempfile.mkstemp fullpath [1] [2] [3] time.sleep seconds [1] urllib.Request fullurl , data , head... - https://man.mtool.work/python/3.14/library/audit_events.html
- セキュリティで考慮すべき点 8562
- セキュリティで考慮すべき点 以下のモジュールには、特有のセキュリティ上の注意点があります: base64 : RFC 4648 にある base64 のセキュリティ上の注意点 hashlib : all constructors take a "usedforsecurity" keyword-only argument disabling known inse
...らのデータの処理には適していません ssl : SSL/TLS のセキュリティ上の注意点 subprocess : サブプロセスのセキュリティ上の注意点 tempfile : mktemp は競合状態への脆弱性のため非推奨です xml : XML のセキュリティ zipfile : 悪意を持って作成された .zip ファイルはディ... - https://man.mtool.work/python/3.14/library/security_warnings.html
- urllib パッケージを使ってインターネット上のリソースを取得するには 8445
- urllib パッケージを使ってインターネット上のリソースを取得するには Author : Michael Foord はじめに Related Articles 同じように Python でインターネットリソースを取得するのに以下の記事が役に立ちます: Basic 認証 Basic 認証 についてのチュートリア
...ml = response . read () URL によってリソースを取得し、それを一時的な場所に保存しておきたいときは、 shutil.copyfileobj() と tempfile.NamedTemporaryFile() 関数を使って行うことができます: import shutil import tempfile import urllib.request with urllib . req...uest . urlopen ( 'http://python.org/' ) as response : with tempfile . NamedTemporaryFile ( delete = False ) as tmp_file : shutil . copyfileobj ( response , tmp_file ) with open ( tmp_file .... - https://man.mtool.work/python/3.14/howto/urllib2.html
- ファイルとディレクトリへのアクセス 8445
- ファイルとディレクトリへのアクセス この章で説明されるモジュールはディスクのファイルやディレクトリを扱います。たとえば、ファイルの属性を読むためのモジュール、ファイルパスを移植可能な方式で操作する、テンポラリファイルを作成するためのモジュール
...コル os.path --- 一般的なパス名操作 stat --- stat() の結果を解釈する filecmp --- ファイルとディレクトリの比較 dircmp クラス tempfile --- 一時ファイルやディレクトリの作成 使用例 非推奨の関数と変数 glob --- Unix 形式のパス名のパターン展開 使用例 fnmatch ---... - https://man.mtool.work/python/3.14/library/filesys.html
- Python ドキュメントの目次 8328
- Python ドキュメントの目次 What's New in Python What's new in Python 3.14 概要 -- リリースハイライト 新しい機能 PEP 649 と PEP 749 : アノテーションの遅延評価 PEP 734 : 複数インタープリタ機能が標準ライブラリに追加 PEP 750 : テンプレート文字列
...th mimetypes mmap multiprocessing os os.path pathlib pdb queue random re shutil site sqlite3 ssl statistics subprocess sys tempfile time tkinter traceback types typing unicodedata venv warnings xml zipimport 最適化 削除されたモジュールと API PEP 594: 標準...fractions importlib.resources inspect itertools math os os.path pathlib platform pdb random shutil sqlite3 statistics sys tempfile threading tkinter tokenize types typing unicodedata unittest uuid 最適化 CPython バイトコードの変更 デモとツール 非推奨 Py...zip hashlib IDLE と idelelib inspect locale logging math operator os pathlib re shutil socket sqlite3 string sys sysconfig tempfile threading time tkinter traceback typing unicodedata unittest venv warnings zipfile 最適化 Faster CPython 起動の高速化 凍結... - https://man.mtool.work/python/3.14/contents.html
- weakref --- 弱参照 8110
- weakref --- 弱参照 ソースコード: Lib/weakref.py weakref モジュールを使うと、Python プログラムからオブジェクトへの 弱参照 を作成できます。 以下では、用語リファレント( referent ) は弱参照が参照するオブジェクトを意味します。 オブジェクトへの弱
...メソッドを使って、以下のようにクラスを実装しようとするかもしれません。 class TempDir : def __init__ ( self ): self . name = tempfile . mkdtemp () def remove ( self ): if self . name is not None : shutil . rmtree ( self . name ) self . name = None @propert...な特定の関数やオブジェクトだけを参照するファイナライザを定義できます。 class TempDir : def __init__ ( self ): self . name = tempfile . mkdtemp () self . _finalizer = weakref . finalize ( self , shutil . rmtree , self . name ) def remove ( self ): self . _... - https://man.mtool.work/python/3.14/library/weakref.html
- Pythonモジュール索引 7993
- Pythonモジュール索引 _ | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | z _ __future__ Future statement definitions __main__ The environment where top-level code is run. Covers command-line i
...thon source files in a directory tree. tarfile Read and write tar-format archive files. telnetlib 非推奨: Removed in 3.13. tempfile Generate temporary files and directories. termios POSIX style tty control. test Regression tests package containing the te... - https://man.mtool.work/python/3.14/py-modindex.html
- What's New In Python 3.2 7993
- What's New In Python 3.2 著者 : Raymond Hettinger この記事では Python 3.1 と比較した Python 3.2 の新機能を説明します。 Python 3.2 は 2011 年 2 月 20 日にリリースされました。 主な変更点をいくつか取り上げ、例を示します。 すべての詳細については
...ement for old handle_accept() and avoids the user to call accept() directly. (Contributed by Giampaolo Rodolà; bpo-6706 .) tempfile tempfile モジュールに新たなコンテキストマネージャ TemporaryDirectory が追加されました。一時ディレクトリの確実な後片付けを容...易に行えます: with tempfile . TemporaryDirectory () as tmpdirname : print ( 'created temporary dir:' , tmpdirname ) (Contributed by Neil Schemenauer a... - https://man.mtool.work/python/3.14/whatsnew/3.2.html