per page, with , order by , clip by
Results of 1 - 10 of about 52 for Directory (0.008 sec.)
email: 使用例 16458
email : 使用例 ここでは email パッケージを使って電子メールメッセージを読む・書く・送信するいくつかの例を紹介します。より複雑な MIME メッセージについても扱います。 まず、単純なテキストメッセージを作成して送信する方法を見てみましょう (テキスト ... ailMessage from email.policy import SMTP def main (): parser = ArgumentParser ( description = """ \ Send the contents of a directory as a MIME message. Unless the -o option is given, the email is sent by forwarding to your local SMTP server, which then do ... es the normal delivery process. Your local machine must be running an SMTP server. """ ) parser . add_argument ( '-d' , '--directory' , help = """Mail the contents of the specified directory, otherwise use the current directory. Only the regular files in ... the directory are sent, and we don't recurse to subdirectories.""" ) parser . add_argument ( '-o' , '--output' , metavar = 'FILE' , help ...
https://man.mtool.work/python/3.14/library/email.examples.html
http.server --- HTTP サーバー 11022
http.server --- HTTP サーバー ソースコード: Lib/http/server.py このモジュールは HTTP サーバを実装するためのクラスを提供しています。 警告 http.server は本番環境での利用には推奨しません。 基本的なセキュリティチェック だけを実装しています。 利 ... 、常に IP アドレスを返すようになりました。 class http.server. SimpleHTTPRequestHandler ( request , client_address , server , directory = None ) このクラスは、ディレクトリ構造を HTTP リクエストに直接対応付け、 directory とその下位ディレクトリにあるファイルを ... 配信します。 directory を省略すると、現在のディレクトリを使います。 バージョン 3.7 で変更: directory 引数を追加しました。 バージョン 3.9 で変更: ... 応する場合、 index_pages で指定されたインデックスページがあるか調べます。 見つかればそのファイルの内容を返し、なければ list_directory() メソッドを呼び出してディレクトリ一覧を生成します。 このメソッドは os.listdir() でディレクトリを調べ、 listdir() が失敗し ...
https://man.mtool.work/python/3.14/library/http.server.html
4. Windows で Python を使う 8587
4. Windows で Python を使う このドキュメントは、 Python を Microsoft Windows で使うときに知っておくべき、 Windows 固有の動作についての概要を伝えることを目的としています。 多くの Unix システムやサービスと異なり、Windows にはシステムでサポート ... いては、 トラブルシューティング を参照してください。 When you first install a runtime, you will likely be prompted to add a directory to your PATH . This is optional, if you prefer to use the py command, but is offered for those who prefer the full range o ... f aliases (such as python3.14.exe ) to be available. The directory will be %LocalAppData%\Python\bin by default, but may be customized by an administrator. Click Start and search for "Edit ... を変更すると、以前にインストールしたランタイムは、新しい場所に移動しない限り使えなくなります。 global_dir (なし) Specify the directory where global commands (such as python3.14.exe and pip.exe ) are stored. This directory should be added to your PATH to mak ...
https://man.mtool.work/python/3.14/using/windows.html
デスクリプタ ガイド 8438
デスクリプタ ガイド Author : Raymond Hettinger Contact : <python at rcn dot com> デスクリプタ を使うと、オブジェクトの属性の検索、保存、削除をカスタマイズできます。 本ガイドは4つの大項目から構成されています。 最初の「入門」では基本の紹介をし ... 作成します。 動的なルックアップ 単に定数を返すよりも、なにか処理を実行するデスクリプタの方が面白いでしょう。 import os class DirectorySize : def __get__ ( self , obj , objtype = None ): return len ( os . listdir ( obj . dirname )) class Directory : size = D ... 性 対話セッションを見ると、属性の検索が動的に行われ、毎回、その時点の状態に応じた結果が計算されることが分かります。 >>> s = Directory ( 'songs' ) >>> g = Directory ( 'games' ) >>> s . size # songs ディレクトリには 20 個のファイルがある 20 >>> g . size # ga ... は自動的に更新される 2 この例は、デスクリプタが計算を実行できることに加え、 __get__() の仮引数の役割も示しています。 self は DirectorySize のインスタンスである size です。 obj は Directory のインスタンスである g または s です。 __get__() は、この obj 引数か ...
https://man.mtool.work/python/3.14/howto/descriptor.html
errno --- 標準の errno システムシンボル 8438
errno --- 標準の errno システムシンボル このモジュールから標準の errno システムシンボルを取得することができます。個々のシンボルの値は errno に対応する整数値です。これらのシンボルの名前は、 linux/include/errno.h から借用されており、網羅的なは ... このエラーは例外 PermissionError に対応します。 errno. ENOENT そのようなファイルやディレクトリはありません (No such file or directory)。 このエラーは例外 FileNotFoundError に対応します。 errno. ESRCH そのようなプロセスはありません (No such process)。 このエ ... evice link) errno. ENODEV そのようなデバイスはありません (No such device) errno. ENOTDIR ディレクトリではありません (Not a directory)。 このエラーは例外 NotADirectoryError に対応します。 errno. EISDIR ディレクトリです (Is a directory)。 このエラーは例外 I ... sADirectoryError に対応します。 errno. EINVAL 無効な引数です (Invalid argument) errno. ENFILE ファイルテーブルがオーバフローしています ...
https://man.mtool.work/python/3.14/library/errno.html
Python 3.15 で削除予定 8154
Python 3.15 で削除予定 The PyImport_ImportModuleNoBlock() : Use PyImport_ImportModule() instead. PyWeakref_GetObject() and PyWeakref_GET_OBJECT() : Use PyWeakref_GetRef() instead. The pythoncapi-compat project can be used to get PyWeakref_G ... tWriteBytecodeFlag :代わりに PyConfig.write_bytecode または PyConfig_Get("write_bytecode") を使ってください。 Py_NoUserSiteDirectory :代わりに PyConfig.user_site_directory または PyConfig_Get("user_site_directory") を使ってください。 Py_UnbufferedStdioFla ...
https://man.mtool.work/python/3.14/deprecations/c-api-pending-removal-in-3.15.ht...
imaplib --- IMAP4 プロトコルクライアント 8154
imaplib --- IMAP4 プロトコルクライアント ソースコード: Lib/imaplib.py このモジュールは、IMAP4 サーバへの接続をカプセル化する IMAP4 、 IMAP4_SSL 、 IMAP4_stream の 3 クラスを定義します。 これらは RFC 3501 で定義された IMAP4rev1 クライアントプ ... のクラスのサブクラス化、インスタンス化、比較など、クラスの直接の参照は避けてください。 Added in version 3.14. IMAP4. list ( directory = '' , pattern = '*' ) pattern にマッチする directory メールボックス名を列挙します。 directory の標準の設定値は最上レベルの ... BYE 応答を返します。 バージョン 3.8 で変更: このメソッドは、任意の例外を黙って無視することがなくなりました。 IMAP4. lsub ( directory = '' , pattern = '*' ) 購読しているメールボックス名のうち、ディレクトリ内でパターンにマッチするものを列挙します。 director ...
https://man.mtool.work/python/3.14/library/imaplib.html
pathlib --- オブジェクト指向のファイルシステムパス 8154
pathlib --- オブジェクト指向のファイルシステムパス Added in version 3.4. ソースコード: Lib/pathlib/ このモジュールはファイルシステムのパスを表すクラスを提供していて、様々なオペレーティングシステムについての適切な意味論をそれらのクラスに持た ... make PurePosixPath('foo/../bar') equivalent to PurePosixPath('bar') , which is wrong if foo is a symbolic link to another directory) 純粋パスオブジェクトは os.PathLike インターフェースを実装しており、そのインターフェースを受理する箇所ならどこでも使用する ... >> p = Path ( 'src' ) >>> if p . info . is_symlink (): ... print ( 'symlink' ) ... elif p . info . is_dir (): ... print ( 'directory' ) ... elif p . info . exists (): ... print ( 'something else' ) ... else : ... print ( 'not found' ) ... directory パスが ... print ( root , "consumes" , sum (( root / file ) . stat () . st_size for file in files ), "bytes in" , len ( files ), "non-directory files" ) if '__pycache__' in dirs : dirs . remove ( '__pycache__' ) 次の例は shutil.rmtree() の簡単な実装です。 rmdir() は ...
https://man.mtool.work/python/3.14/library/pathlib.html
shutil --- 高水準のファイル操作 8154
shutil --- 高水準のファイル操作 ソースコード: Lib/shutil.py shutil モジュールは、ファイルやファイルの集合に対するさまざまな高水準の操作を提供します。 特に、ファイルのコピーや削除を行う関数が用意されています。 個々のファイルを操作する場合は ... ラーを呼び出してエラーを処理します。 両方とも省略した場合は例外を呼び出し元に伝播させます。 If path is a symbolic link to a directory followed by a trailing path separator, such as 'link/' , the operating system resolves the link, so rmtree() deletes the c ... ontents of the directory it points to and then fails to remove path itself. pathlib.Path strips trailing separators, so rmtree(Path('link/')) refus ... いない場合、カレントディレクトリを path の先頭に追加します。 mode に os.X_OK が含まれている場合は、Windows API の NeedCurrentDirectoryForExePathW に問い合わせて、カレントディレクトリを path の先頭に追加するかどうか決めます。 実行ファイルを探す際にカレントデ ...
https://man.mtool.work/python/3.14/library/shutil.html
ftplib --- FTP プロトコルクライアント 8020
ftplib --- FTP プロトコルクライアント ソースコード: Lib/ftplib.py このモジュールでは FTP クラスと、それに関連するいくつかの項目を定義しています。 FTP クラスは、FTPプロトコルのクライアント側の機能を備えています。このクラスを使うとFTPのいろい ... p . login () # user anonymous, passwd anonymous@ '230 Login successful.' >>> ftp . cwd ( 'debian' ) # change into "debian" directory '250 Directory successfully changed.' >>> ftp . retrlines ( 'LIST' ) # list directory contents -rw-rw-r-- 1 1176 1176 1063 ... 6 4096 Dec 19 2000 pool drwxr-sr-x 4 1176 1176 4096 Nov 17 2008 project drwxr-xr-x 3 1176 1176 4096 Oct 10 2012 tools '226 Directory send OK.' >>> with open ( 'README' , 'wb' ) as fp : ... ftp . retrbinary ( 'RETR README' , fp . write ) '226 Transfer comp ...
https://man.mtool.work/python/3.14/library/ftplib.html
PREV 1 2 3 4 5 6 NEXT