Re: [Tutor] How to format JSON output within script

2009-08-17 Thread Vincent Gulinao
Got it, what I need was json.dumps. Sorry I posted too early. Thanks. On Tue, Aug 18, 2009 at 11:50 AM, Kent Johnson wrote: > On Mon, Aug 17, 2009 at 11:02 PM, Vincent > Gulinao wrote: >> I see you could pipe your output to 'python -mjson.tool', but how do I >> achieve the same within my script?

Re: [Tutor] How to format JSON output within script

2009-08-17 Thread Kent Johnson
On Mon, Aug 17, 2009 at 11:02 PM, Vincent Gulinao wrote: > I see you could pipe your output to 'python -mjson.tool', but how do I > achieve the same within my script? json.tool is a pretty simple wrapper around json.load() and json.dump(). You can look at the source code in your Python lib directo

Re: [Tutor] How to format JSON output within script

2009-08-17 Thread Mal Wanstall
On Tue, Aug 18, 2009 at 1:02 PM, Vincent Gulinao wrote: > I see you could pipe your output to 'python -mjson.tool', but how do I > achieve the same within my script? > > TIA. > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/li

Re: [Tutor] How to format JSON output within script

2009-08-17 Thread Alan Gauld
"Vincent Gulinao" wrote I see you could pipe your output to 'python -mjson.tool', but how do I achieve the same within my script? We don't charge you by the word. A wee bit more explanation and background would be useful please? What are you trying to do exactly? Alan G. ___

[Tutor] How to format JSON output within script

2009-08-17 Thread Vincent Gulinao
I see you could pipe your output to 'python -mjson.tool', but how do I achieve the same within my script? TIA. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor