473,327 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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

kj

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?

TIA!

kynn

--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
Jun 27 '08 #1
2 2028
On Jun 20, 7:17 am, kj <so...@987jk.com.invalidwrote:
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.

Jun 27 '08 #2
kj
In <19**********************************@w8g2000prd.g ooglegroups.comJohn Machin <sj******@lexicon.netwrites:
>On Jun 20, 7:17 am, kj <so...@987jk.com.invalidwrote:
>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.
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark Wilson CPU | last post by:
This must be easy, but I'm missing something... I want to execute a Perl script, and capture ALL its output into a PHP variable. Here are my 2 files: -------------------------------------...
3
by: edgekaos | last post by:
Is method 2 valid? Method 1: wstring input = L"STRING"; wstring output = input; transform(output.begin(), output.end(), output.begin(), towupper); Method 2: wstring input = L"STRING";...
4
by: Kevin Mansel via .NET 247 | last post by:
Ok, basically this is my problem. I'm building a console app tocall a dos program. So i'm using the Shell command to call theprogram, now depending on what happens, I want to read theoutput that...
24
by: kalamantina | last post by:
#include "stdafx.h" #include <stdio.h> #define output( x ) printf( #x "\r\n" );fflush( stdout ) class CMyBase { public: CMyBase() { output( CMyBase() ); f(*this);
0
by: newbie | last post by:
i'm a newbie of c language. can anyone help me to implement the code so that I can get the ciphertext from the output. thanks. #ifndef _3DES_H #define _3DES_H #ifndef uint8 #define uint8 ...
32
by: spibou | last post by:
Is the output of the C preprocessor deterministic ? What I mean by that is , given 2 compilers which conform to the same standard, will their preprocessors produce identical output given as input...
3
by: MatsL | last post by:
Hi, This is seriously driving me crazy, could anyone explain to me why neither of these doesn't produce XHTML compliant output (it is being called in Render() btw): output.WriteLine("<img...
3
by: undshan | last post by:
I am writing a code that needs to open a file, create an output file, run through my function, prints the results to the output file, and closes them within a loop. Here is my code: #include...
2
by: gabosom | last post by:
Hi! I've been breaking my head trying to get the output variables from my Stored Procedure. This is my SP code CREATE PROCEDURE GetKitchenOrderDetail( @idService int, --outPut Variables ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.