Results of 1 - 10 of about 133 for OSError (0.017 sec.)
- 8. エラーと例外 — Python 3.14.8 ドキュメント 10331
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python チュートリアル » 8. エラーと例外 テーマ 自動 ライト ダーク | 8. エラーと例外 ¶ これまでエラーメッセージについては簡単に触れるだけでしたが、チュートリアル中
...例外を処理できるようにします): import sys try : f = open ( 'myfile.txt' ) s = f . readline () i = int ( s . strip ()) except OSError as err : print ( "OSエラー:" , err ) except ValueError : print ( "データを整数に変換できません。" ) except Exception as er...されるコードを書くのに役立ちます。例えば次のようにします: for arg in sys . argv [ 1 :]: try : f = open ( arg , 'r' ) except OSError : print ( arg , 'が開けません' ) else : print ( arg , 'は' , len ( f . readlines ()), '行です' ) f . close () 追加のコード...た場合、その未処理の例外は処理された例外のエラーメッセージに含まれます: >>> try : ... open ( "database.sqlite" ) ... except OSError : ... raise RuntimeError ( "unable to handle error" ) ... Traceback (most recent call last): File "<stdin>" , line 2 , in... - https://man.mtool.work/python/3.14/tutorial/errors.html
- 8. エラーと例外 — Python 3.14.8 ドキュメント 10331
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python チュートリアル » 8. エラーと例外 テーマ 自動 ライト ダーク | 8. エラーと例外 ¶ これまでエラーメッセージについては簡単に触れるだけでしたが、チュートリアル中
...例外を処理できるようにします): import sys try : f = open ( 'myfile.txt' ) s = f . readline () i = int ( s . strip ()) except OSError as err : print ( "OSエラー:" , err ) except ValueError : print ( "データを整数に変換できません。" ) except Exception as er...されるコードを書くのに役立ちます。例えば次のようにします: for arg in sys . argv [ 1 :]: try : f = open ( arg , 'r' ) except OSError : print ( arg , 'が開けません' ) else : print ( arg , 'は' , len ( f . readlines ()), '行です' ) f . close () 追加のコード...た場合、その未処理の例外は処理された例外のエラーメッセージに含まれます: >>> try : ... open ( "database.sqlite" ) ... except OSError : ... raise RuntimeError ( "unable to handle error" ) ... Traceback (most recent call last): File "<stdin>" , line 2 , in... - https://man.mtool.work/python/3.14/tutorial/errors.html
- socket --- 低水準ネットワークインターフェース — Python 3.14.8 ドキュメント 9498
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » socket --- 低水準ネットワークインターフェース テーマ 自動 ライト ダーク | socket --- 低水準ネット
...エラー時には例外が発生します。引数型のエラーやメモリ不足の場合には通常の例外が発生し、ソケットやアドレス関連のエラーの場合は OSError またはそのサブクラスが発生します。 setblocking() メソッドで、非ブロッキングモードを使用することができます。また、より汎用的...指定する事ができます。 モジュールの内容 ¶ The module socket exports the following elements. 例外 ¶ exception socket. error ¶ OSError の非推奨のエイリアスです。 バージョン 3.3 で変更: PEP 3151 に基づき、このクラスは OSError のエイリアスになりました。 excep...tion socket. herror ¶ OSError のサブクラス。この例外はアドレス関連のエラー、つまり gethostbyname_ex() と gethostbyaddr() などの、 POSIX C API の h_errno... - https://man.mtool.work/python/3.14/library/socket.html
- socket --- 低水準ネットワークインターフェース — Python 3.14.8 ドキュメント 9498
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » socket --- 低水準ネットワークインターフェース テーマ 自動 ライト ダーク | socket --- 低水準ネット
...エラー時には例外が発生します。引数型のエラーやメモリ不足の場合には通常の例外が発生し、ソケットやアドレス関連のエラーの場合は OSError またはそのサブクラスが発生します。 setblocking() メソッドで、非ブロッキングモードを使用することができます。また、より汎用的...指定する事ができます。 モジュールの内容 ¶ The module socket exports the following elements. 例外 ¶ exception socket. error ¶ OSError の非推奨のエイリアスです。 バージョン 3.3 で変更: PEP 3151 に基づき、このクラスは OSError のエイリアスになりました。 excep...tion socket. herror ¶ OSError のサブクラス。この例外はアドレス関連のエラー、つまり gethostbyname_ex() と gethostbyaddr() などの、 POSIX C API の h_errno... - https://man.mtool.work/python/3.14/library/socket.html
- msvcrt --- MS VC++ ランタイムの有用なルーチン群 — Python 3.14.8 ドキュメント 9147
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » MS Windows 固有のサービス » msvcrt --- MS VC++ ランタイムの有用なルーチン群 テーマ 自動 ライト ダーク | msvcrt --- MS VC++ ランタイ
...するべきです。 Availability : Windows. バージョン 3.3 で変更: このモジュールの操作で以前は IOError が送出されていたところで OSError が送出されるようになりました。 ファイル操作関連 ¶ msvcrt. locking ( fd , mode , nbytes ) ¶ Lock part of a file based on fi...le descriptor fd from the C runtime. Raises OSError on failure. The locked region of the file extends from the current file position for nbytes bytes, and may continue beyond...s cannot be locked, the program immediately tries again after 1 second. If, after 10 attempts, the bytes cannot be locked, OSError is raised. msvcrt. LK_NBLCK ¶ msvcrt. LK_NBRLCK ¶ 指定されたバイト列にロックをかけます。指定領域がロックできなかった場合、... - https://man.mtool.work/python/3.14/library/msvcrt.html
- msvcrt --- MS VC++ ランタイムの有用なルーチン群 — Python 3.14.8 ドキュメント 9147
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » MS Windows 固有のサービス » msvcrt --- MS VC++ ランタイムの有用なルーチン群 テーマ 自動 ライト ダーク | msvcrt --- MS VC++ ランタイ
...するべきです。 Availability : Windows. バージョン 3.3 で変更: このモジュールの操作で以前は IOError が送出されていたところで OSError が送出されるようになりました。 ファイル操作関連 ¶ msvcrt. locking ( fd , mode , nbytes ) ¶ Lock part of a file based on fi...le descriptor fd from the C runtime. Raises OSError on failure. The locked region of the file extends from the current file position for nbytes bytes, and may continue beyond...s cannot be locked, the program immediately tries again after 1 second. If, after 10 attempts, the bytes cannot be locked, OSError is raised. msvcrt. LK_NBLCK ¶ msvcrt. LK_NBRLCK ¶ 指定されたバイト列にロックをかけます。指定領域がロックできなかった場合、... - https://man.mtool.work/python/3.14/library/msvcrt.html
- os --- 雑多なオペレーティングシステムインターフェース — Python 3.14.8 ドキュメ... 8905
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 汎用オペレーティングシステムサービス » os --- 雑多なオペレーティングシステムインターフェース テーマ 自動 ライト ダーク | os --- 雑多
...ての関数は、間違った、あるいはアクセス出来ないファイル名やファイルパス、その他型が合っていても OS が受理しない引数に対して、 OSError (またはそのサブクラス)を送出します。 exception os. error ¶ 組み込みの OSError 例外に対するエイリアスです。 os. name ¶ impo...エラーを無視してクローズします。以下のコードと等価です: for fd in range ( fd_low , fd_high ): try : os . close ( fd ) except OSError : pass os. copy_file_range ( src , dst , count , offset_src = None , offset_dst = None ) ¶ Copy count bytes from file desc...dst . In Linux kernel older than 5.3, the files pointed to by src and dst must reside in the same filesystem, otherwise an OSError is raised with errno set to errno.EXDEV . This copy is done without the additional cost of transferring data from the kern... - https://man.mtool.work/python/3.14/library/os.html
- os --- 雑多なオペレーティングシステムインターフェース — Python 3.14.8 ドキュメ... 8434
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 汎用オペレーティングシステムサービス » os --- 雑多なオペレーティングシステムインターフェース テーマ 自動 ライト ダーク | os --- 雑多
...ての関数は、間違った、あるいはアクセス出来ないファイル名やファイルパス、その他型が合っていても OS が受理しない引数に対して、 OSError (またはそのサブクラス)を送出します。 exception os. error ¶ 組み込みの OSError 例外に対するエイリアスです。 os. name ¶ impo...エラーを無視してクローズします。以下のコードと等価です: for fd in range ( fd_low , fd_high ): try : os . close ( fd ) except OSError : pass os. copy_file_range ( src , dst , count , offset_src = None , offset_dst = None ) ¶ Copy count bytes from file desc...dst . In Linux kernel older than 5.3, the files pointed to by src and dst must reside in the same filesystem, otherwise an OSError is raised with errno set to errno.EXDEV . This copy is done without the additional cost of transferring data from the kern... - https://man.mtool.work/python/3.14/library/os.html
- 例外処理 — Python 3.14.8 ドキュメント 8313
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 例外処理 テーマ 自動 ライト ダーク | 例外処理 ¶ この章で説明する関数を使うと、 Python の例外の処理や例外の送出ができるようになりま
...behavior that if filenameObject is not NULL , it is passed to the constructor of type as a third parameter. In the case of OSError exception, this is used to define the filename attribute of the exception instance. PyObject * PyErr_SetFromErrnoWithFilen...¶ 戻り値: 常に NULL 。 次に属します: Stable ABI on Windows (バージョン 3.7 より). This is a convenience function to raise OSError . If called with ierr of 0 , the error code returned by a call to GetLastError() is used instead. It calls the Win32 funct...n FormatMessage() to retrieve the Windows description of error code given by ierr or GetLastError() , then it constructs a OSError object with the winerror attribute set to the error code, the strerror attribute set to the corresponding error message (g... - https://man.mtool.work/python/3.14/c-api/exceptions.html
- 例外処理 — Python 3.14.8 ドキュメント 8313
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 例外処理 テーマ 自動 ライト ダーク | 例外処理 ¶ この章で説明する関数を使うと、 Python の例外の処理や例外の送出ができるようになりま
...behavior that if filenameObject is not NULL , it is passed to the constructor of type as a third parameter. In the case of OSError exception, this is used to define the filename attribute of the exception instance. PyObject * PyErr_SetFromErrnoWithFilen...¶ 戻り値: 常に NULL 。 次に属します: Stable ABI on Windows (バージョン 3.7 より). This is a convenience function to raise OSError . If called with ierr of 0 , the error code returned by a call to GetLastError() is used instead. It calls the Win32 funct...n FormatMessage() to retrieve the Windows description of error code given by ierr or GetLastError() , then it constructs a OSError object with the winerror attribute set to the error code, the strerror attribute set to the corresponding error message (g... - https://man.mtool.work/python/3.14/c-api/exceptions.html