|
From: David H. <neg...@gm...> - 2009-06-07 13:18:33
|
Note that {'expression': '\\200'} is the repr view of the dict entry.
Strings will show any escaped character using the escape seq ('\'). In
other words -- it's actually showing you that there _is_ a normal slash
included in the string.
I.e. -- are you sure there's a problem?
If you do: print dict['expression'] then you'll get '\200', which is
presumably exactly what you intended.
This is a common python user misunderstanding.
Observe the following:
>>> x = 'a\\b\nc'
>>> x
'a\\b\nc'
>>> print x
a\b
c
>>> print repr(x)
'a\\b\nc'
regards,
- David Hostetler
On Sun, Jun 7, 2009 at 08:54, Scott Sibley <sis...@gm...> wrote:
> Sorry if this got sent twice.
>
> I'm probably just looking over the answer.
>
> The following:
>
> [widget_foo]
> expression='\200'
>
> Turns into this:
>
> {'expression': '\\200'}
>
> Note the extra backslash. Any solution?
>
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> Configobj-develop mailing list
> Con...@li...
> https://lists.sourceforge.net/lists/listinfo/configobj-develop
>
>
|