per page, with , order by , clip by
Results of 1 - 8 of about 8 for guess (0.005 sec.)
mimetypes --- ファイル名を MIME タイプへマップする 13718
mimetypes --- ファイル名を MIME タイプへマップする ソースコード: Lib/mimetypes.py mimetypes モジュールは、ファイル名または URL と、ファイル拡張子に対応する MIME 型との間の変換を行います。 ファイル名から MIME 型への変換と、MIME 型からファイル ... くても、もしこれらの関数が、 init() がセットアップする情報に依存していれば、これらの関数は、 init() を呼びます。 mimetypes. guess_type ( url , strict = True ) url で与えられるファイル名あるいは URL に基づいて、ファイルの型を推定します。URL は文字列また ... た。 バージョン 3.13 で ソフト非推奨 <Soft deprecated> : URL の代わりにファイルパスを渡すことは非推奨です。 ファイルパスには guess_file_type() を使ってください。 mimetypes. guess_file_type ( path , * , strict = True ) path で指定されたパスに基づき、ファ ... イルの型を推定します。 guess_type() に似ていますが、URL ではなくパスを受け付けます。 パスには文字列、bytes オブジェクト、 path-like object を指定できま ...
https://man.mtool.work/python/3.14/library/mimetypes.html
email: 使用例 9055
email : 使用例 ここでは email パッケージを使って電子メールメッセージを読む・書く・送信するいくつかの例を紹介します。より複雑な MIME メッセージについても扱います。 まず、単純なテキストメッセージを作成して送信する方法を見てみましょう (テキスト ... n a MIME-aware mail reader. \n ' # Open the files in binary mode. You can also omit the subtype # if you want MIMEImage to guess it. for file in pngfiles : with open ( file , 'rb' ) as fp : img_data = fp . read () msg . add_attachment ( img_data , mai ... ますが、本来は gzip などで圧縮された # ファイルのような単純なケースを確認する必要があります。 ctype , encoding = mimetypes . guess_file_type ( path ) if ctype is None or encoding is not None : # 推測できなかったか、ファイルがエンコード (圧縮) されている ... ーションではファイル名を安全なものにする必要があります filename = part . get_filename () if not filename : ext = mimetypes . guess_extension ( part . get_content_type ()) if not ext : # 汎用のバイナリデータ用拡張子を使います ext = '.bin' filename = f 'p ...
https://man.mtool.work/python/3.14/library/email.examples.html
http.server --- HTTP サーバー 8729
http.server --- HTTP サーバー ソースコード: Lib/http/server.py このモジュールは HTTP サーバを実装するためのクラスを提供しています。 警告 http.server は本番環境での利用には推奨しません。 基本的なセキュリティチェック だけを実装しています。 利 ... 日時より後に変更されていなければ、 304 、 'Not Modified' レスポンスを送信します。 そうでなければ、 extensions_map 変数を使う guess_type() メソッドを呼び出してコンテントタイプを推測し、ファイルの内容を返します。 出力は 'Content-type:' と推測されたコンテン ... 、エラーを示す None を返します。 後者の場合、呼び出し側がそれ以上行うことはありません。 どちらの場合もヘッダーを送信します。 guess_type ( path ) 指定された path にあるファイルの型を推測します。 MIME の Content-type ヘッダーに使える type/subtype 形式の文 ... 字列を返します。 The default implementation looks the file's extension up in extensions_map , falling back to mimetypes.guess_file_type() and then to 'application/octet-stream' . バージョン 3.13 で変更: フォールバックとして mimetypes.guess_file_typ ...
https://man.mtool.work/python/3.14/library/http.server.html
wsgiref --- WSGI ユーティリティとリファレンス実装 8314
wsgiref --- WSGI ユーティリティとリファレンス実装 ソースコード: Lib/wsgiref 警告 wsgiref はリファレンス実装であり、本番環境での使用は推奨されません。 このモジュールは基本的なセキュリティ検査だけを実装しています。 Web Server Gateway Interfac ... 様については PEP 3333 を、型アノテーションに使える型エイリアスについては WSGIEnvironment を参照してください。 wsgiref.util. guess_scheme ( environ ) environ 辞書の HTTPS 環境変数を調べることで wsgi.url_scheme が "http" か "https" のどちらであるべきか推 ... 置き換えられました。 get_scheme ( ) 現在のリクエストで使われている URL スキームを返します。デフォルト実装は wsgiref.util の guess_scheme() を使い、現在のリクエストの environ 変数に基づいてスキームが"http" か "https" かを推測します。 setup_environ ( ) e ... rver. Takes a path to serve from and an optional port number (defaults to 8000), then tries to serve files. MIME types are guessed from the file names, 404 errors are raised if the file is not found. """ import mimetypes import os import sys from wsgi ...
https://man.mtool.work/python/3.14/library/wsgiref.html
What's New In Python 3.13 8241
What's New In Python 3.13 エディタ : Adam Turner と Thomas Wouters この記事では Python 3.12 と比較した Python 3.13 の新機能を解説します。Python 3.13 は2024年10月7日にリリースされました。全詳細については 変更履歴 をご覧ください。 参考 PEP 71 ... ます。 (Mark Dickinson and Victor Stinner による gh-73468 での貢献。) mimetypes ファイルシステムのパスから MIME 型を推測する guess_file_type() 関数が追加されました。 guess_type() にパスを渡すことは soft deprecated になりました。 (Serhiy Storchaka による ... --cgi フラグが非推奨になりました。 Python 3.15 で削除されます。 (Gregory P. Smith による gh-109096 での貢献。) mimetypes : guess_type() にファイルパスを引数として渡すことが ソフト非推奨 になりました。 代わりに guess_file_type() を使ってください。 (Ser ...
https://man.mtool.work/python/3.14/whatsnew/3.13.html
email.utils: 各種ユーティリティ 8169
email.utils : 各種ユーティリティ ソースコード: Lib/email/utils.py email.utils モジュールには、いくつかの便利なユーティリティがあります: email.utils. localtime ( dt = None ) Return local time as an aware datetime object. If called without ar ... o the rules in RFC 2822 Section 3.3 . However, some mailers don't follow that format as specified, so parsedate() tries to guess correctly in such cases. date is a string containing an RFC 2822 date, such as "Mon, 20 Nov 1995 19:12:08 -0500" . If it s ...
https://man.mtool.work/python/3.14/library/email.utils.html
The Python Profilers 8079
The Python Profilers Source code: Lib/profile.py and Lib/pstats.py Introduction to the profilers cProfile and profile provide deterministic profiling of Python programs. A profile is a set of statistics that describes how often and for how ... t of callers for each of the listed functions. If you want more functionality, you're going to have to read the manual, or guess what the following functions do: p . print_callees () p . add ( 'restats' ) Invoked as a script, the pstats module is a st ...
https://man.mtool.work/python/3.14/library/profile.html
3. Python を構成する 7916
3. Python を構成する 3.1. ビルド要件 CPython をビルドするためには、次のものが必要です: C11 コンパイラ。 C11 オプション機能 は不要です。 Windows では、 Microsoft Visual Studio 2017 以降が必要です。 IEEE 754 浮動小数点数と 浮動小数点 Not-a-Nu ... スト用 Python のバージョンと一致していなければなりません。 --build =BUILD BUILD でビルドするための設定です。通常は、 config.guess により推測されます。 --host =HOST HOST (ターゲットプラットフォーム) で動作するプログラムをビルドするためのクロスコンパイル ...
https://man.mtool.work/python/3.14/using/configure.html
PREV 1 NEXT