Re: printing backslash

2006-06-07 Thread Steve Holden
[EMAIL PROTECTED] wrote: > hi > how can i sucessfully print |\| in the output of a print command > > a = "|\|" > print a > > but it gives me "|\\|" > No it doesn't: >>> a = "|\|" >>> print a |\| >>> > i tried raw strings too, but it doesn't print |\| . It prints |\\| > instead > > eventu

Re: printing backslash

2006-06-07 Thread micklee74
Tim Chase wrote: > > i want to print something like this > > > > |\| > > > > first i tried it as string > > > > a = "|\|" > > > > it prints ok > > > > but when i put it to a list > > > > a = ["|\|"] > > > > it gives me '|\\|' .there are 2 back slashes...i only want one.. how > > can i properly es

printing backslash

2006-06-07 Thread micklee74
hi how can i sucessfully print |\| in the output of a print command a = "|\|" print a but it gives me "|\\|" i tried raw strings too, but it doesn't print |\| . It prints |\\| instead eventually, i also want |\| to be inside a list: alist = ["|\|", 'blah', 'blah'] . How can i put |\| inside a

Re: printing backslash

2006-06-07 Thread Tim Chase
> i want to print something like this > > |\| > > first i tried it as string > > a = "|\|" > > it prints ok > > but when i put it to a list > > a = ["|\|"] > > it gives me '|\\|' .there are 2 back slashes...i only want one.. how > can i properly escape it? > I have tried [r"|\|"] , [r'\\'] b

Re: printing backslash

2006-06-07 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > i want to print something like this > > |\| > > first i tried it as string > > a = "|\|" > > it prints ok > > but when i put it to a list > > a = ["|\|"] > > it gives me '|\\|'. if you want to print "|\|", why are you printing the list? > there are 2 back slashe

printing backslash

2006-06-07 Thread micklee74
hi i want to print something like this |\| first i tried it as string a = "|\|" it prints ok but when i put it to a list a = ["|\|"] it gives me '|\\|' .there are 2 back slashes...i only want one.. how can i properly escape it? I have tried [r"|\|"] , [r'\\'] but they do not work... thanks