Embedded Python implementation
Bjorn Pettersen
BPettersen at NAREX.com
Mon Sep 9 14:58:48 EDT 2002
> From: Evan [mailto:tagith1394 at hotmail.com]
[snip]
> I have inserted a small amount of C to print the contents of
> com_list,
> right before the PyRun_String, here is the complete output (*** marks
> beginning and end of the script)
>
> ***
> 112 (p) 114 (r) 105 (i) 110 (n) 116 (t) 32 ( ) 34 (") 104 (h) 101 (e)
> 108 (l) 108 (l) 111 (o) 34 (") 10 (
> ) ***
> File "<string>", line 2
>
> ^
> SyntaxError: invalid syntax
I can't tell from your output, but there are a couple of gotcha's:
- the line terminator needs to be the same as for your
Python installation.
- The last character(s) in the string needs to be a line
terminator.
hth,
-- bjorn
More information about the Python-list
mailing list