[Tutor] quoting and escaping

Kent Johnson kent37 at tds.net
Wed Jan 14 04:13:10 CET 2009


On Tue, Jan 13, 2009 at 6:09 PM, Jon Crump <jjcrump at myuw.net> wrote:
> I've got strings like this:
>
> s = """[{"title" : "Egton, Yorkshire", "start" : new Date(1201,1,4),
> "description" : "Hardy's long name: Egton, Yorkshire. &lt;br&gt; "},
> {"title" : "Guilsborough, Yorkshire", "start" : new Date(1201,1,5),
> "description" : "Hardy's long name: Guilsborough, Yorkshire. &lt;br&gt;
> &lt;img src=\"document.png\" style=\"cursor: pointer\"
> onclick=\"SimileAjax.WindowManager.cancelPopups();show_next('tab3');pager('006');
> return false\"/&gt;pg.006: 1201-02-05 to 1202-03-07"}]"""

Where does this come from? It looks like the string representation of
a dict. Can you get the actual dict? Perhaps there is a better way to
do whatever you are doing?

Kent


More information about the Tutor mailing list