Results of 1 - 7 of about 7 for PyRun (0.004 sec.)
- 超高水準レイヤ 13450
- 超高水準レイヤ この章の関数を使うとファイルまたはバッファにある Python ソースコードを実行できますが、より詳細なやり取りをインタプリタとすることはできないでしょう。 これらの関数の一部は、文法の開始記号を引数に取ります。 利用できる開始記号は
...引数を渡す場合は、Python ランタイムが使うのと同じライブラリによって作成されたものだと確実に分かっている必要があります。 int PyRun_AnyFile ( FILE * fp , const char * filename ) 下記の PyRun_AnyFileExFlags() の closeit を 0 に、 flags を NULL にして単純化...したインターフェースです。 int PyRun_AnyFileFlags ( FILE * fp , const char * filename , PyCompilerFlags * flags ) 下記の PyRun_AnyFileExFlags() の closeit を 0...にして単純化したインターフェースです。 int PyRun_AnyFileEx ( FILE * fp , const char * filename , int closeit ) 下記の PyRun_AnyFileExFlags() の flags を NULL にして単純化し... - https://man.mtool.work/python/3.14/c-api/veryhigh.html
- 拡張と埋め込み FAQ 8869
- 拡張と埋め込み FAQ C で独自の関数を作ることはできますか? はい。関数、変数、例外、そして新しいタイプまで含んだビルトインモジュールを C で作れます。これはドキュメント Python インタプリタの拡張と埋め込み で説明されています。 ほとんどの中級から
...のや、より高度な方法を提供するものがあります。 C から任意の Python 文を実行するにはどうしますか? これを行う最高水準の関数は PyRun_SimpleString() で、一つの文字列引数を取り、モジュール __main__ のコンテキストでそれを実行し、成功なら 0 、例外 ( SyntaxErr...or を含む) が発生したら -1 を返します。更に制御したければ、 PyRun_String() を使ってください。ソースは Python/pythonrun.c の ' PyRun_SimpleString() を参照してください。 C から任意の Python...式を評価するにはどうしますか? 先の質問の PyRun_String() を、スタートシンボル Py_eval_input を渡して呼び出してください。これは式を解析し、評価してその値を返します。 Pytho... - https://man.mtool.work/python/3.14/faq/extending.html
- Python support for the Linux perf profiler 8778
- Python support for the Linux perf profiler author : Pablo Galindo The Linux perf profiler is a very powerful tool that allows you to profile and obtain information about the performance of your application. perf also has a very vibrant ecos
..._start | ---_start | --90.71%--__libc_start_main Py_BytesMain | |--56.88%--pymain_run_python.constprop.0 | | | |--56.13%--_PyRun_AnyFileObject | | _PyRun_SimpleFileObject | | | | | |--55.02%--run_mod | | | | | | | --54.65%--PyEval_EvalCode | | | _PyEv..._start | ---_start | --89.86%--__libc_start_main Py_BytesMain | |--55.43%--pymain_run_python.constprop.0 | | | |--54.71%--_PyRun_AnyFileObject | | _PyRun_SimpleFileObject | | | | | |--53.62%--run_mod | | | | | | | --53.26%--PyEval_EvalCode | | | py::<... - https://man.mtool.work/python/3.14/howto/perf_profiling.html
- 1. 他のアプリケーションへの Python の埋め込み 8506
- 1. 他のアプリケーションへの Python の埋め込み 前章では、 Python を拡張する方法、すなわち C 関数のライブラリを Python に結びつけて機能を拡張する方法について述べました。同じようなことを別の方法でも実行できます: それは、自分の C/C++ アプリケー
...ンタプリタを呼び出せるようになります。 インタプリタを呼び出すには、異なるいくつかの方法があります: Python 文が入った文字列を PyRun_SimpleString() に渡す、 stdio ファイルポインタとファイル名 (これはエラーメッセージ内でコードを識別するためだけのものです)...を PyRun_SimpleFile() に渡す、といった具合です。これまでの各章で説明した低水準の操作を呼び出して、Python オブジェクトを構築したり使...y_InitializeFromConfig ( & config ); if ( PyStatus_Exception ( status )) { goto exception ; } PyConfig_Clear ( & config ); PyRun_SimpleString ( "from time import time,ctime \n " "print('Today is', ctime(time())) \n " ); if ( Py_FinalizeEx () < 0 ) { e... - https://man.mtool.work/python/3.14/extending/embedding.html
- Windows 上の Python FAQ 8033
- Windows 上の Python FAQ Python プログラムを Windows で動かすにはどうしますか? これは必ずしも単純な質問ではありません。Windows コマンドラインからプログラムを実行するのに慣れてしまっている場合は、全て明らかなことに思えるでしょう; そうでない場
...ことができます。 #include <Python.h> ... Py_Initialize (); // Pythonの初期化 initmyAppc (); // ヘルパーclassの初期化(import) PyRun_SimpleString ( "import myApp" ); // shadowクラスのimport Python の C API には、pythonNN.dll をビルドするのに使われたコンパ... - https://man.mtool.work/python/3.14/faq/windows.html
- インタープリタの初期化と終了処理 7997
- インタープリタの初期化と終了処理 初期化前にインタープリタを設定する方法の詳細は、 Python の初期化設定 を参照してください。 Python の初期化前 Python を組み込むアプリケーションでは、一部の関数と グローバルな設定変数 を除き、ほかの Python/C AP
..._SetArgv() の呼び出しが完了した後に sys.path の先頭の要素を取り出すことで、同じ効果が得られます。例えばこのように使います: PyRun_SimpleString ( "import sys; sys.path.pop(0) \n " ); Added in version 3.1.3. バージョン 3.11 で非推奨、バージョン 3.15 で削... - https://man.mtool.work/python/3.14/c-api/interp-lifecycle.html
- What's New in Python 2.6 7942
- What's New in Python 2.6 著者 : A.M. Kuchling (amk at amk.ca) この記事では、2008 年 10 月 1 日にリリースされた Python 2.6 の新機能を説明します。 リリース日程は PEP 361 に記載されています。 Python 2.6 の主要なテーマは、言語を大幅に再設計する
...hon 2.6.5 以前との互換性がなくなります。 以前のバージョンにも対応する必要があれば、 PySys_SetArgv() はそのままにし、その後 PyRun_SimpleString("sys.path.pop(0)\n") を呼んで sys.path の先頭要素を取り除けます。 このセキュリティ問題は CVE 2008-5983 として... - https://man.mtool.work/python/3.14/whatsnew/2.6.html
PREV
1
NEXT