No subject
Sun Nov 12 08:01:13 CET 2006
PyRun_SimpleFile() if it's a file, and PyRun_InteractiveLoop() if the
file is really interactive, like stdin.
PyRun_File() runs a file, but you hand it
- Py_single_input, Py_file_input, or Py_eval_input, to tell it what
kind of data you're handing it. According to the Grammar file:
# single_input is a single interactive statement;
# file_input is a module or sequence of commands read from an input file;
# eval_input is the input for the eval() and input() functions.
- the dictionaries it should use for the local and global namespaces.
It also has a PyObject* return value, unlike the other two, so you can
actually get results back from your Python script.
| Of course I want to know more about the other methods as well.
|
| I know this is not the "source.wanted" but maybe someone has pointers to
| some (simple) examples of Python embedded i C?
See the Demo/embed directory in the Python source distribution.
| (In case you haven't noticed I'm new to Python, but eager to learn and
| start working with it. I'm most grateful for all the help and support I
| can get. By the way, are there any prepared presentations of Python,
| like slides, pros/cons-lists etc, to help in introducing it to collegues
| and employers??)
http://www.python.org/doc/Intros.html is a good place to start.
--
Dan Schmidt -> dfan at harmonixmusic.com, dfan at alum.mit.edu
Honest Bob & the http://www2.thecia.net/users/dfan/
Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/
Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/
More information about the Python-list
mailing list