Why no output from xml.dom.ext.PrettyPrint?

kj socyl at 987jk.com.invalid
Fri Jun 20 08:15:31 EDT 2008


In <19999864-b381-41b5-90fa-7e3cc3996d65 at w8g2000prd.googlegroups.com> John Machin <sjmachin at lexicon.net> writes:

>On Jun 20, 7:17 am, kj <so... at 987jk.com.invalid> wrote:
>> OK, the following should work but doesn't, and I can't figure out
>> why:
>>
>> >>> from xml.marshal.generic import dumps
>> >>> dumps( ( 1, 2.0, 'foo', [3,4,5] ) )
>>
>> '<?xml version="1.0"?><marshal><tuple><int>1</int><float>2.0</float><string>foo</string><list id="i2"><int>3</int><int>4</int><int>5</int></list></tuple></marshal>'
>>
>> >>> from xml.dom.ext import PrettyPrint
>> >>> PrettyPrint( dumps( ( 1, 2.0, 'foo', [3,4,5] ) ) )
>> >>> import sys
>> >>> PrettyPrint( dumps( ( 1, 2.0, 'foo', [3,4,5] ) ), sys.stdout )
>>
>> Why am I seeing no output from PrettyPrint?
>>

>You need to ask whoever you got your xml package from. In standard-
>issue Python 2.5.2, there is an xml package with xml.dom, but it
>contains no xml.dom.ext nor an xml.marshal.

Hmmm!?  OK.  Thanks!

Kynn
-- 
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.



More information about the Python-list mailing list