per page, with , order by , clip by
Results of 1 - 10 of about 49 for status (0.066 sec.)
http --- HTTP モジュール群 14217
http --- HTTP モジュール群 ソースコード: Lib/http/__init__.py http は、HyperText Transfer Protocol を扱ういくつかのモジュールをまとめたパッケージです。 http.client は低水準のHTTPプロトコルのクライアントです。高水準の URL を開く操作には urll ... 永続化機能を提供しています http モジュールは、HTTP 関連のコードを書くのに役立つ次の列挙型も定義しています。 class http. HTTPStatus Added in version 3.5. 一連の HTTP ステータスコード、理由の表現、英語で書かれた長い記述を定義した enum.IntEnum のサブクラス ... です。 使い方: >>> from http import HTTPStatus >>> HTTPStatus . OK HTTPStatus.OK >>> HTTPStatus . OK == 200 True >>> HTTPStatus . OK . value 200 >>> HTTPStatus . OK . ph ... rase 'OK' >>> HTTPStatus . OK . description 'Request fulfilled, document follows' >>> list ( HTTPStatus ) [HTTPStatus.CONTINUE, HTTPStatus.SWITCHIN ...
https://man.mtool.work/python/3.14/library/http.html
Python 初期化設定 14126
Python 初期化設定 PyInitConfig C API Added in version 3.14. Python は Py_InitializeFromInitConfig() で初期化できます。 Py_RunMain() 関数は、カスタマイズされた Python プログラムを書くために使用できます。 Initialization, Finalization, and Thr ... 初期化設定" 使用例 常に隔離モードで実行するようカスタマイズした Python の例です。 int main ( int argc , char ** argv ) { PyStatus status ; PyConfig config ; PyConfig_InitPythonConfig ( & config ); config . isolated = 1 ; /* コマンドライン引数をデコード ... する。 Python を暗黙に事前初期化する (隔離モード)。 */ status = PyConfig_SetBytesArgv ( & config , argc , argv ); if ( PyStatus_Exception ( status )) { goto exception ; } status = Py_I ... nitializeFromConfig ( & config ); if ( PyStatus_Exception ( status )) { goto exception ; } PyConfig_Clear ( & config ); return Py_RunMain (); exception : PyConfig_Clear ( ...
https://man.mtool.work/python/3.14/c-api/init_config.html
mailbox --- 様々な形式のメールボックスを操作する 9387
mailbox --- 様々な形式のメールボックスを操作する ソースコード: Lib/mailbox.py このモジュールでは二つのクラス Mailbox および Message をディスク上のメールボックスとそこに収められたメッセージへのアクセスと操作のために定義しています。 Mailbox は ... 字列 info をセットします。 MaildirMessage インスタンスが mboxMessage や MMDFMessage のインスタンスに基づいて生成されるとき、 Status および X-Status ヘッダは省かれ以下の変換が行われます: 結果の状態 mboxMessage または MMDFMessage の状態 "cur" サブディレクト ... ージの状態を示すフラグ、たとえば読んだかどうかあるいは重要だとマークを付けられているかどうかといったようなもの、は典型的には Status および X-Status に収められます。 規定されている mbox メッセージのフラグは以下の通りです: Flag 意味 説明 R 読んだもの 読んだ ... d) 削除予定とされたもの F フラグ付き(Flagged) 重要とされたもの A 返答済み(Answered) 返答されたもの "R" および "O" フラグは Status ヘッダに記録され、 "D"、"F"、"A" フラグは X-Status ヘッダに記録されます。フラグとヘッダは通常記述された順番に出現します。 ...
https://man.mtool.work/python/3.14/library/mailbox.html
wsgiref --- WSGI ユーティリティとリファレンス実装 9191
wsgiref --- WSGI ユーティリティとリファレンス実装 ソースコード: Lib/wsgiref 警告 wsgiref はリファレンス実装であり、本番環境での使用は推奨されません。 このモジュールは基本的なセキュリティ検査だけを実装しています。 Web Server Gateway Interfac ... ng_defaults で更新した環境辞書を出力する。 def simple_app ( environ , start_response ): setup_testing_defaults ( environ ) status = '200 OK' headers = [( 'Content-type' , 'text/plain; charset=utf-8' )] start_response ( status , headers ) ret = [( " %s ... ntionally not compliant to the # standard, so the validator is going to break def simple_app ( environ , start_response ): status = '200 OK' # HTTP Status headers = [( 'Content-type' , 'text/plain' )] # HTTP Headers start_response ( status , headers ) ... 。 このクラスは SimpleHandler のサブクラスで、HTTP の "本サーバ" でないソフトウェアと使うことを意図しています。もしあなたが Status: ヘッダを HTTP ステータスを送信するのに使うようなゲートウェイプロトコルの実装(CGI、FastCGI、SCGIなど)を書いている場合、お ...
https://man.mtool.work/python/3.14/library/wsgiref.html
http.client --- HTTP プロトコルクライアント 8980
http.client --- HTTP プロトコルクライアント ソースコード: Lib/http/client.py このモジュールでは HTTP および HTTPS プロトコルのクライアントサイドを実装しているクラスを定義しています。通常、このモジュールは直接使いません --- urllib.request モ ... ブクラスです。 exception http.client. ResponseNotReady ImproperConnectionState のサブクラスです。 exception http.client. BadStatusLine HTTPException のサブクラスです。 サーバーから返された HTTP ステータスコードをクライアントが理解できない場合に送出されま ... でサーバーから長すぎる行を受信した場合に送出されます。 exception http.client. RemoteDisconnected ConnectionResetError と BadStatusLine のサブクラスです。 HTTPConnection.getresponse() がレスポンスを読み込もうとしても接続からデータをまったく読み込めず、相 ... 手側が接続を閉じたと分かった場合に送出されます。 Added in version 3.5: 以前は BadStatusLine ('') を送出していました。 このモジュールで定義されている定数は以下の通りです: http.client. HTTP_PORT HTTP プロトコルの ...
https://man.mtool.work/python/3.14/library/http.client.html
1. 他のアプリケーションへの Python の埋め込み 8678
1. 他のアプリケーションへの Python の埋め込み 前章では、 Python を拡張する方法、すなわち C 関数のライブラリを Python に結びつけて機能を拡張する方法について述べました。同じようなことを別の方法でも実行できます: それは、自分の C/C++ アプリケー ... かの操作を実現するのに利用できます。 #define PY_SSIZE_T_CLEAN #include <Python.h> int main ( int argc , char * argv []) { PyStatus status ; PyConfig config ; PyConfig_InitPythonConfig ( & config ); /* 省略可能だが推奨 */ status = PyConfig_SetBytesString ... ( & config , & config . program_name , argv [ 0 ]); if ( PyStatus_Exception ( status )) { goto exception ; } status = Py_InitializeFromConfig ( & config ); if ( PyStatus_Exception ( status ... (time())) \n " ); if ( Py_FinalizeEx () < 0 ) { exit ( 120 ); } return 0 ; exception : PyConfig_Clear ( & config ); Py_ExitStatusException ( status ); } 注釈 #define PY_SSIZE_T_CLEAN は、いくつかの API では int の代わりに Py_ssize_t が使われるべきである ...
https://man.mtool.work/python/3.14/extending/embedding.html
Expat C API 8180
Expat C API The xml.parsers.expat module exposes selected Expat functions through its expat_CAPI capsule. This allows extension modules to use the same Expat library as Python. The interface is declared in pyexpat.h , which must be included ... XML_Size ( * GetErrorColumnNumber ) ( XML_Parser parser ) XML_Size ( * GetErrorLineNumber ) ( XML_Parser parser ) enum XML_Status ( * Parse ) ( XML_Parser parser , const char * s , int len , int isFinal ) XML_Parser ( * ParserCreate_MM ) ( const XML_Ch ... void * userData ) void ( * SetStartDoctypeDeclHandler ) ( XML_Parser parser , XML_StartDoctypeDeclHandler start ) enum XML_Status ( * SetEncoding ) ( XML_Parser parser , const XML_Char * encoding ) int ( * SetHashSalt ) ( XML_Parser parser , unsigned l ...
https://man.mtool.work/python/3.14/c-api/pyexpat.html
4. その他の制御フローツール 8180
4. その他の制御フローツール 前章で紹介した while 文の他にも、 Python にはいくつか制御フローツールがあり、本章で説明します。 4.1. if 文 おそらく最もおなじみの文型は if 文でしょう。例えば: >>> x = int ( input ( "Please enter an integer: " )) ... レクション作成 users = { 'Hans' : 'active' , 'Éléonore' : 'inactive' , '景太郎' : 'active' } # 方針: コピーを反復 for user , status in users . copy () . items (): if status == 'inactive' : del users [ user ] # 方針: 新コレクション作成 active_users = {} f ... or user , status in users . items (): if status == 'active' : active_users [ user ] = status 4.3. range() 関数 数列にわたって反復を行う必要 ... マッチしなければ、どの分岐も実行されません。 最も単純な形式では、対象の値を1つ以上のリテラルと比較します。 def http_error ( status ): match status : case 400 : return "Bad request" case 404 : return "Not found" case 418 : return "I'm a teapot" case _ : ...
https://man.mtool.work/python/3.14/tutorial/controlflow.html
1. Extending Python with C or C++ 7878
1. Extending Python with C or C++ It is quite easy to add new built-in modules to Python, if you know how to program in C. Such extension modules can do two things that can't be done directly in Python: they can implement new built-in objec ... tring as argument and returns an integer. We want this function to be callable from Python as follows: >>> import spam >>> status = spam . system ( "ls -l" ) Begin by creating a file spammodule.c . (Historically, if a module is called spam , the C file ... ollowed by an import of the module: #define PY_SSIZE_T_CLEAN #include <Python.h> int main ( int argc , char * argv []) { PyStatus status ; PyConfig config ; PyConfig_InitPythonConfig ( & config ); /* Add a built-in module, before Py_Initialize */ if ( ... tderr , "Error: could not extend in-built modules table \n " ); exit ( 1 ); } /* Pass argv[0] to the Python interpreter */ status = PyConfig_SetBytesString ( & config , & config . program_name , argv [ 0 ]); if ( PyStatus_Exception ( status )) { goto e ...
https://man.mtool.work/python/3.14/extending/extending.html
urllib.request --- URL を開くための拡張可能なライブラリ 7667
urllib.request --- URL を開くための拡張可能なライブラリ ソースコード: Lib/urllib/request.py urllib.request モジュールは、Basic 認証や Digest 認証、リダイレクト、Cookie などが絡む複雑な状況で URL (主に HTTP) を開くための関数とクラスを定義して ... スタンスでなければなりません。 詳細は HTTPSConnection を参照してください。 この関数は常にプロパティ url 、 headers 、および status を持ち、 コンテキストマネージャ として動作するオブジェクトを返します。これらのプロパティに関する詳細は urllib.response.add ... se are not wrapped in URLError and propagate unchanged. These include subclasses of http.client.HTTPException , such as BadStatusLine for a malformed status line, and subclasses of OSError , such as TimeoutError if the server does not respond within ti ... = 'http://localhost:8080' , data = DATA , method = 'PUT' ) with urllib . request . urlopen ( req ) as f : pass print ( f . status ) print ( f . reason ) 以下はベーシック HTTP 認証の例です: import urllib.request # Basic HTTP 認証に対応する OpenerDirecto ...
https://man.mtool.work/python/3.14/library/urllib.request.html
PREV 1 2 3 4 5 NEXT