Adam Olsen wrote:
On Feb 23, 7:18 pm, bvdp wrote:
Gabriel Genellina wrote:
En Mon, 23 Feb 2009 23:31:20 -0200, bvdp escribió:
Gabriel Genellina wrote:
En Mon, 23 Feb 2009 22:46:34 -0200, bvdp escribió:
Chris Rebert wrote:
On Mon, Feb 23, 2009 at 4:26 PM, bvdp wrote:
[problem with Python
On Feb 23, 7:18 pm, bvdp wrote:
> Gabriel Genellina wrote:
> > En Mon, 23 Feb 2009 23:31:20 -0200, bvdp escribió:
> >> Gabriel Genellina wrote:
> >>> En Mon, 23 Feb 2009 22:46:34 -0200, bvdp escribió:
> Chris Rebert wrote:
> > On Mon, Feb 23, 2009 at 4:26 PM, bvdp wrote:
>
> > [pro
On Tue, 24 Feb 2009 00:46:34 -, bvdp wrote:
Just because I never really thought too much about it :) I'm doing my
work on a linux box and my user is on windows ... and he's used to using
'\' ... but, you are absolutely right! Just use '/' on both systems and
be done with it. Of course
Gabriel Genellina wrote:
En Mon, 23 Feb 2009 23:31:20 -0200, bvdp escribió:
Gabriel Genellina wrote:
En Mon, 23 Feb 2009 22:46:34 -0200, bvdp escribió:
Chris Rebert wrote:
On Mon, Feb 23, 2009 at 4:26 PM, bvdp wrote:
[problem with Python and Windows paths using backslashes]
Is there an
En Mon, 23 Feb 2009 23:31:20 -0200, bvdp escribió:
Gabriel Genellina wrote:
En Mon, 23 Feb 2009 22:46:34 -0200, bvdp escribió:
Chris Rebert wrote:
On Mon, Feb 23, 2009 at 4:26 PM, bvdp wrote:
[problem with Python and Windows paths using backslashes]
Is there any particular reason you ca
Gabriel Genellina wrote:
En Mon, 23 Feb 2009 22:46:34 -0200, bvdp escribió:
Chris Rebert wrote:
On Mon, Feb 23, 2009 at 4:26 PM, bvdp wrote:
[problem with Python and Windows paths using backslashes]
Is there any particular reason you can't just internally use regular
forward-slashes for the
En Mon, 23 Feb 2009 22:46:34 -0200, bvdp escribió:
Chris Rebert wrote:
On Mon, Feb 23, 2009 at 4:26 PM, bvdp wrote:
[problem with Python and Windows paths using backslashes]
Is there any particular reason you can't just internally use regular
forward-slashes for the paths? They work in Windo
bvdp wrote:
> Not sure if it's more clear or not :)
>
> >>> a="c:\\Program\x20Files\\test"
> >>> a
> 'c:\\Program Files\\test'
> >>> print a
> c:\Program Files\test
>
> Which is all fine. And I didn't need to use decode().
>
> So, in this case I'm assuming that the interpreter is converting t
Bear in mind that it's the string as it really is that is
being operated on, not the representation of it that you displayed
Yes, that is the confusion ... what is displayed and what's actually in
the string.
I think I understand it all now :)
Thanks.
--
http://mail.python.org/mailman/lis
Chris Rebert wrote:
On Mon, Feb 23, 2009 at 4:26 PM, bvdp wrote:
[problem with Python and Windows paths using backslashes]
Is there any particular reason you can't just internally use regular
forward-slashes for the paths? They work in Windows from Python in
nearly all cases and you can easily
On Mon, Feb 23, 2009 at 4:26 PM, bvdp wrote:
[problem with Python and Windows paths using backslashes]
Is there any particular reason you can't just internally use regular
forward-slashes for the paths? They work in Windows from Python in
nearly all cases and you can easily interconvert using os.
On Tue, 24 Feb 2009 00:26:29 -, bvdp wrote:
So, in this case I'm assuming that the interpreter is converting the
escapes on assignment.
The compiler converts the escapes on creating its internal
representation of the string, before assignment ever gets
involved.
--
Rhodri James *-* Wild
On Mon, 23 Feb 2009 22:05:42 -, bvdp wrote:
So, we think something is working and send of a bug fix to our client :)
I'm not sure I understand this at all and wonder if there is bug?
>>> a="c:\\Program\x20Files\\test"
>>> a
'c:\\Program Files\\test'
so far, so good.
>>> a.decode("st
Tim Wintle wrote:
On Mon, 2009-02-23 at 17:00 -0700, bvdp wrote:
Let's see if this makes sense:
>>> a='c:\\Program Files\\test'
>>> a.decode('string-escape')
'c:\\Program Files\test'
Hint: try running
print a
and see what's written - I think that the interpreter adds extra "\"
character
andrew cooke wrote:
do you know that a string with the letter "r" in front doesn't escape
slashes? it's intended for regular expressions, but would simplify things
for you here too.
just do
a=r'c:\\Program Files\test'
Yes, I knew that. Unfortunately in my program loop I really don't have
On Mon, 2009-02-23 at 17:00 -0700, bvdp wrote:
> Let's see if this makes sense:
>
> >>> a='c:\\Program Files\\test'
> >>> a.decode('string-escape')
> 'c:\\Program Files\test'
Hint: try running
>>> print a
and see what's written - I think that the interpreter adds extra "\"
characters to escap
do you know that a string with the letter "r" in front doesn't escape
slashes? it's intended for regular expressions, but would simplify things
for you here too.
just do
a=r'c:\\Program Files\test'
andrew
bvdp wrote:
>
> I'm getting hopelessly lost in a series of \\\ s :)
>
> Let's see
I'm getting hopelessly lost in a series of \\\ s :)
Let's see if this makes sense:
>>> a='c:\\Program Files\\test'
>>> a.decode('string-escape')
'c:\\Program Files\test'
In this case there are still 2 '\'s before the P; but only 1 before the
't'. Now, when it comes time to open the file w
bvdp wrote:
So, we think something is working and send of a bug fix to our client :)
I'm not sure I understand this at all and wonder if there is bug?
>>> a="c:\\Program\x20Files\\test"
>>> a
'c:\\Program Files\\test'
so far, so good.
>>> a.decode("string-escape")
'c:\\Program Files\test'
So, we think something is working and send of a bug fix to our client :)
I'm not sure I understand this at all and wonder if there is bug?
>>> a="c:\\Program\x20Files\\test"
>>> a
'c:\\Program Files\\test'
so far, so good.
>>> a.decode("string-escape")
'c:\\Program Files\test'
Umm, not so go
20 matches
Mail list logo