[PyAR2] Thanks and another question...
srilyk at gmail.com
Fri Dec 21 15:23:26 CET 2007
Ah! Those examples were super helpful! Thanks!
On Dec 21, 2007 6:55 AM, Greg Lindstrom <gslindstrom at gmail.com> wrote:
> Here are some examples:
> w = 'World'
> print 'Hello, %s' % World ==> 'Hello, World'
> c = 2
> print 'Count = %d now' % c ==> 'Count = 2 now'
> count = 3
> print 'Hello, %s. Count = %d' % (w, count) ==> 'Hello, World. Count =
> Notice that since I am putting 2 values in the thirs example, I have to
> "wrap" the values in ()'s.
> On Dec 21, 2007 6:31 AM, W W < srilyk at gmail.com> wrote:
> > The urllib info was very helpful!
> > This isn't a specific question, more of one in general - I don't really
> > understand what's going on.
> > I've seen it in python, but I'm working my way through the PyGTK+
> > tutorial and I just came across these two lines:
> > def callback(self, widget, data=None):
> > print "Hello again - %s was pressed" % data
> > and I'm wondering exactly what the %s and % data mean? I've seen it
> > several places but never really an explanation of what it is or how it does
> > what it does?
> > Thanks!
> > Wayne
> > --
> > To be considered stupid and to be told so is more painful than being
> > called gluttonous, mendacious, violent, lascivious, lazy, cowardly: every
> > weakness, every vice, has found its defenders, its rhetoric, its ennoblement
> > and exaltation, but stupidity hasn't. - Primo Levi
> > _______________________________________________
> > PyAR2 mailing list
> > PyAR2 at python.org
> > http://mail.python.org/mailman/listinfo/pyar2
To be considered stupid and to be told so is more painful than being called
gluttonous, mendacious, violent, lascivious, lazy, cowardly: every weakness,
every vice, has found its defenders, its rhetoric, its ennoblement and
exaltation, but stupidity hasn't. - Primo Levi
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyAR2