Results of 1 - 10 of about 58 for command (0.004 sec.)
- shlex --- 単純な字句解析 13188
- shlex --- 単純な字句解析 ソースコード: Lib/shlex.py shlex クラスは Unix シェルに似た、単純な構文に対する字句解析器を簡単に書けるようにします。 このクラスはしばしば、 Python アプリケーションのための実行制御ファイルのような小規模言語を書く場合
...ン 3.12 で変更: s 引数に None を渡すと、 sys.stdin から読み込む代わりに例外を送出するようになりました。 shlex. join ( split_command ) リスト split_command のトークンを連結して文字列を返します。 この関数は split() の逆の操作を行います。 >>> from shlex imp...トで渡す関数の利用を検討してください。 以下のイディオムは安全ではないかもしれません: >>> filename = 'somefile; rm -rf ~' >>> command = 'ls -l {} ' . format ( filename ) >>> print ( command ) # executed by a shell: boom! ls -l somefile; rm -rf ~ quote() が...そのセキュリティホールをふさぎます: >>> from shlex import quote >>> command = 'ls -l {} ' . format ( quote ( filename )) >>> print ( command ) ls -l 'somefile; rm -rf ~' >>> remote_command = 'ssh ho... - https://man.mtool.work/python/3.14/library/shlex.html
- 1. Extending Python with C or C++ 11080
- 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
...e shortly how it ends up being called): static PyObject * spam_system ( PyObject * self , PyObject * args ) { const char * command ; int sts ; if ( ! PyArg_ParseTuple ( args , "s" , & command )) return NULL ; sts = system ( command ); return PyLong_From...ールから spam.error 例外を送出できます。 static PyObject * spam_system ( PyObject * self , PyObject * args ) { const char * command ; int sts ; if ( ! PyArg_ParseTuple ( args , "s" , & command )) return NULL ; sts = system ( command ); if ( sts < 0 ) { P...yErr_SetString ( SpamError , "System command failed" ); return NULL ; } return PyLong_FromLong ( sts ); } 1.3. Back to the Example Going back to our example function,... - https://man.mtool.work/python/3.14/extending/extending.html
- cmd --- 行指向のコマンドインタープリターのサポート 10084
- cmd --- 行指向のコマンドインタープリターのサポート ソースコード: Lib/cmd.py Cmd クラスでは、行指向のコマンドインタープリタを書くための簡単なフレームワークを提供します。テストハーネスや管理ツール、そして、後により洗練されたインターフェイスで
...ラップするプロトタイプとして、こうしたインタープリタはよく役に立ちます。 A command interpreter built with Cmd typically presents the user with an interactive prompt, reads input one line at a time, and dis...patches each command to a method named do_ followed by the command name. For example, the help command is handled by the do_help() method. Apar...t from the built-in help command, most of the interpreter's behavior is defined by the do_* methods you add in your own subclass. class cmd. Cmd ( complete... - https://man.mtool.work/python/3.14/library/cmd.html
- pdb --- Python デバッガ 9675
- pdb --- Python デバッガ ソースコード: Lib/pdb.py pdb モジュールは Python プログラム用の対話型ソースコードデバッガを定義しています。 条件付きブレークポイントの設定、ソース行単位でのステップ実行、スタックフレームの調査、ソースコードの表示、任
...ンドラインから pdb を呼び出して他のスクリプトをデバッグすることもできます。 例えば、次のようにします。 python - m pdb [ - c command ] ( - m module | - p pid | pyfile ) [ args ... ] モジュールとして pdb を起動すると、デバッグ中のプログラムが異常終了したと...イントなど) はそのまま維持されるので、たいていの場合、プログラム終了時にデバッガーも終了させるよりも便利なはずです。 -c , --command <command> .pdbrc ファイルで指定したかのようにコマンドを実行します。 デバッガコマンド を参照してください。 バージョン 3.2 で...び出しが返したものはなんでも返します。関数に入るとすぐにデバッガプロンプトが現れます。 pdb. set_trace ( * , header = None , commands = None ) 呼び出し元のスタックフレームでデバッガに入ります。 コードがデバッグ中でなくても、例えばアサーションが失敗したとき... - https://man.mtool.work/python/3.14/library/pdb.html
- Pythonモジュール索引 9675
- 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
...according to :pep:`3119`. aifc 非推奨: Removed in 3.13. annotationlib Functionality for introspecting annotations argparse Command-line option and argument parsing library. array Space efficient arrays of uniformly typed numeric values. ast Abstract Syn...Removed in 3.13. chunk 非推奨: Removed in 3.13. cmath Mathematical functions for complex numbers. cmd Build line-oriented command interpreters. code Facilities to implement read-eval-print loops. codecs Encode and decode data and streams. codeop Compil...ns and operations on callable objects. g gc Interface to the cycle-detecting garbage collector. getopt Portable parser for command line options; support both short and long option names. getpass Portable reading of passwords and retrieval of the userid.... - https://man.mtool.work/python/3.14/py-modindex.html
- The Python Profilers 9250
- 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
...rofile and cProfile Module Reference Both the profile and cProfile modules provide the following functions: profile. run ( command , filename = None , sort = -1 ) この関数は exec() 関数に渡せる一つの引数と、オプション引数としてファイル名を指定できます。...全ての場合でこのルーチンは以下を実行します: exec ( command , __main__ . __dict__ , __main__ . __dict__ ) そして実行結果からプロファイル情報を収集します。 ファイル名が指定されていない...す。 sort が指定されている場合は、 Stats インスタンスに渡され、結果をどのように並び替えるかを制御します。 profile. runctx ( command , globals , locals , filename = None , sort = -1 ) この関数は run() と似ていますが、 command 文字列の実行に使うグローバル名... - https://man.mtool.work/python/3.14/library/profile.html
- 2. Python インタープリタを使う 9250
- 2. Python インタープリタを使う 2.1. インタープリタを起動する Python が使用可能な環境では、インタープリタは一般的に /usr/local/bin/python3.14 にインストールされています。使用している Unix シェルの検索パスに /usr/local/bin を追加すると、次のコ
...するか、ファイルを標準入力として起動すると、そのファイルから スクリプト を読み込んで実行します。 インタープリタを python -c command [arg] ... のように起動する方法もあります。シェルの -c オプションと同じように、この形式では command に指定した文を実行します...。Python の文には空白やシェルにとって特殊な意味を持つ文字が含まれることが多いため、通常は command 全体を引用符で囲むことをお勧めします。 Python のモジュールにはスクリプトとしても便利に使えるものがあります。 python -m mod...v[0] が空文字列になります。 スクリプト名の代わりに標準入力を意味する '-' を指定すると、 sys.argv[0] は '-' になります。 -c command を使うと sys.argv[0] は '-c' になります。 -m module を使うと sys.argv[0] は見つかったモジュールのフルパスになります。 -c c... - https://man.mtool.work/python/3.14/tutorial/interpreter.html
- code --- インタープリター基底クラス 8957
- code --- インタープリター基底クラス ソースコード: Lib/code.py code モジュールはread-eval-print (読み込み-評価-表示)ループをPythonで実装するための機能を提供します。対話的なインタプリタプロンプトを提供するアプリケーションを作るために使える二つ
...バージョン 3.6 で変更: exitmsg 引数が追加されました. バージョン 3.13 で変更: local_exit 引数が追加されました。 code. compile_command ( source , filename = '<input>' , symbol = 'single' ) この関数はPythonのインタプリタメインループ(別名、read-eval-printルー...e ( source , filename = '<input>' , symbol = 'single' ) インタプリタ内のあるソースをコンパイルし実行します。引数は compile_command() のものと同じです。 filename のデフォルトは '<input>' で、 symbol は 'single' です。あるいくつかのことが起きる可能性があり...ます: 入力が不正で、 compile_command() が例外 (通常は SyntaxError ) を送出した場合。 showsyntaxerror() メソッドを呼び出して構文エラーのトレースバックを表示しま... - https://man.mtool.work/python/3.14/library/code.html
- 5. macOS で Python を使う 8957
- 5. macOS で Python を使う このドキュメントでは、Mac コンピュータで Python を使い始める際に知っておくべき、macOS 固有の挙動を概説します。 macOS を実行する Mac 上の Python は、ほかの Unix 派生プラットフォーム上の Python と非常によく似ています
...インストールが完了すると、 Summary ウィンドウが表示されます。 /Applications/Python 3.14/ ウィンドウで Install Certificates.command のアイコンまたはファイルをダブルクリックして、インストールを完了します。 一時的な Terminal シェルウィンドウが開き、新しい...釈 最近の macOS には、 /usr/bin/python3 に python3 コマンドが含まれています。 これは、Apple の開発ツールである Xcode または Command Line Tools for Xcode によって、それらのツールで使用するために提供される Python にリンクしており、通常は古く、不完全なバージ...mal risk while installing or testing. This installation layout may change in future releases. 既知の注意点と制限: The UNIX command-line tools package, which is selected by default, will install links in /usr/local/bin for python3.14t , the free-threaded... - https://man.mtool.work/python/3.14/using/mac.html
- 監査イベント表 8679
- 監査イベント表 この表は、 CPython ランタイムと標準ライブラリ全体で sys.audit() または PySys_Audit() の呼び出しによって送出されるすべてのイベントを含んでいます。これらの呼び出しは、 3.8 以降に追加されました ( PEP 578 を参照) 。 これらのイベン
...n.PyInterpreterState_New [1] cpython._PySys_ClearAuditHooks [1] cpython.remote_debugger_script script_path [1] cpython.run_command command [1] cpython.run_file filename [1] cpython.run_interactivehook hook [1] cpython.run_module module-name [1] cpython....operation [1] os.startfile/2 path , operation , arguments , cwd , show_cmd [1] os.symlink src , dst , dir_fd [1] os.system command [1] os.truncate fd , length [1] [2] os.unsetenv key [1] os.utime path , times , ns , dir_fd [1] os.walk top , topdown , on...dst_path _winapi.CreateNamedPipe name , open_mode , pipe_mode _winapi.CreatePipe _winapi.CreateProcess application_name , command_line , current_directory _winapi.OpenProcess process_id , desired_access _winapi.TerminateProcess handle , exit_code _posi... - https://man.mtool.work/python/3.14/library/audit_events.html