> > c=2
> > e=3
> > s="12"
> > code.append('funtion ("c, e,s")')
> > print "\n".join(code) + '\n'
> >
Hello,
You could try this:
-----------------------
from string import Template
code = ""
c=2
e=3
s="12"
code.append(Template('function ("$c, $e, $s")').substitute(vars()))
print "\n".join(code) + '\n'
------------------------
For more informations about templates, see:
http://docs.python.org/lib/node105.html
Note that is new in version 2.4...
Cyril
--
http://mail.python.org/mailman/listinfo/python-list