WilsonOfCanada wrote:
Hellos,
I know that if you have:
happy = r"C:\moo"
print happy
you get C:\moo instead of C:\\moo
The thing is that I want to do this a variable instead.
ex. testline = fileName.readline()
rawtestline = r testline
Python does not have 'raw strings'. It only has '
On Tue, Aug 18, 2009 at 5:51 PM, WilsonOfCanada wrote:
> However, when I send the list over as a dictionary for HTML:
>
> d["places"] = arrPlaces
>
> return render_to_response('rentSearch.html', d)
>
> the HTML using Django has:
>
> {{ places }} but returns ['C:\\moo', 'C:\\supermoo']
As we've exp
However, when I send the list over as a dictionary for HTML:
d["places"] = arrPlaces
return render_to_response('rentSearch.html', d)
the HTML using Django has:
{{ places }} but returns ['C:\\moo', 'C:\\supermoo']
--
http://mail.python.org/mailman/listinfo/python-list
Dnia 19-08-2009 o 02:09:29 WilsonOfCanada napisał(a):
You're right, but the moment I append it onto a list, it would become
C:\\moo.
No, it would not. Really!
C:\moo
C:\supermoo
['C:\\moo', 'C:\\supermoo']
It is not the matter of content of the string but only of a way of
*presentation
On Tue, Aug 18, 2009 at 5:09 PM, WilsonOfCanada wrote:
> You're right, but the moment I append it onto a list, it would become
> C:\\moo.
>
> arrPlaces = []
> intPoint =0
>
> while (len(testline)):
> testline = fileName.readline()
> print testline
> arrPlaces[intPoint].append(t
You're right, but the moment I append it onto a list, it would become
C:\\moo.
arrPlaces = []
intPoint =0
while (len(testline)):
testline = fileName.readline()
print testline
arrPlaces[intPoint].append(testline)
intPoint += 1
print arrPlaces
> C:\moo
> C:\supermo
On Tue, 2009-08-18 at 16:16 -0700, WilsonOfCanada wrote:
> Hellos,
>
> I know that if you have:
>
> happy = r"C:\moo"
> print happy
>
> you get C:\moo instead of C:\\moo
>
> The thing is that I want to do this a variable instead.
>
> ex. testline = fileName.readline()
> rawtestline = r t