Re: Printing a percent sign

2006-09-26 Thread Fredrik Lundh
John Machin wrote: > I'll take your word for it; it's been quite a while :-) *Something* in > the dim dark past worked like that makefiles? -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing a percent sign

2006-09-26 Thread John Machin
Fredrik Lundh wrote: > John Machin wrote: > > > I'll take your word for it; it's been quite a while :-) *Something* in > > the dim dark past worked like that > > makefiles? Bingo! Actually, double bingo!! >From the docs for GNU Make: """ Because dollar signs are used to start make variable refer

Re: Printing a percent sign

2006-09-26 Thread John Machin
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, John > Machin wrote: > > > Lawrence D'Oliveiro wrote: > >> In message <[EMAIL PROTECTED]>, John > >> Machin wrote: > >> > >> > 1. Reasoning: How do you get a literal "'" into an SQL string constant? > >> > How do you get a literal "\" in

Re: Printing a percent sign

2006-09-26 Thread Diez B. Roggisch
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, John > Machin wrote: > >> 1. Reasoning: How do you get a literal "'" into an SQL string constant? >> How do you get a literal "\" into a Python string constant? How do you >> get a literal "$" into some *x shell command lines? Do you de

Re: Printing a percent sign

2006-09-26 Thread John Machin
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, John > Machin wrote: > > > 1. Reasoning: How do you get a literal "'" into an SQL string constant? > > How do you get a literal "\" into a Python string constant? How do you > > get a literal "$" into some *x shell command lines? Do you

Re: Printing a percent sign

2006-09-26 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, John Machin wrote: > Lawrence D'Oliveiro wrote: >> In message <[EMAIL PROTECTED]>, John >> Machin wrote: >> >> > 1. Reasoning: How do you get a literal "'" into an SQL string constant? >> > How do you get a literal "\" into a Python string constant? How do you >> >

Re: Printing a percent sign

2006-09-26 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, John Machin wrote: > 1. Reasoning: How do you get a literal "'" into an SQL string constant? > How do you get a literal "\" into a Python string constant? How do you > get a literal "$" into some *x shell command lines? Do you detect a > pattern? None of which appl

Re: Printing a percent sign

2006-09-25 Thread John Machin
[EMAIL PROTECTED] wrote: > Thanks -- a percent escapes itself when using %-formatting. > > Stephen > > [EMAIL PROTECTED] wrote: > > Hi all. How do I escape the "%" sign in a print statement so that it > > prints? Thanks. > > The following methods of getting answers to problems can be handy if it'

Re: Printing a percent sign

2006-09-25 Thread stephen
Thanks -- a percent escapes itself when using %-formatting. Stephen [EMAIL PROTECTED] wrote: > Hi all. How do I escape the "%" sign in a print statement so that it > prints? Thanks. > > Stephen -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing a percent sign

2006-09-25 Thread Rob Williscroft
Rob Williscroft wrote in news:Xns9849DC7DB4102rtwfreenetREMOVEcouk@ 216.196.109.145 in comp.lang.python: > wrote in news:[EMAIL PROTECTED] in > comp.lang.python: > >> Hi all. How do I escape the "%" sign in a print statement so that it >> prints? Thanks. >> > > print "%%" > Ok, confused by

Re: Printing a percent sign

2006-09-25 Thread Georg Brandl
[EMAIL PROTECTED] wrote: > Hi all. How do I escape the "%" sign in a print statement so that it > prints? Thanks. >>> print "%" % Did you mean in a string being interpolated with the % operator? Georg -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing a percent sign

2006-09-25 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Hi all. How do I escape the "%" sign in a print statement so that it > prints? Thanks. print doesn't do anything with percent signs: >>> print "%" % if you're doing string formatting using the "string % tuple" operator, use two percent signs to get a percent sign in

Re: Printing a percent sign

2006-09-25 Thread Rob Williscroft
wrote in news:[EMAIL PROTECTED] in comp.lang.python: > Hi all. How do I escape the "%" sign in a print statement so that it > prints? Thanks. > print "%%" Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Printing a percent sign

2006-09-25 Thread stephen
Hi all. How do I escape the "%" sign in a print statement so that it prints? Thanks. Stephen -- http://mail.python.org/mailman/listinfo/python-list