binary file
Nader Emami
emami at knmi.nl
Mon Jun 20 08:38:26 EDT 2005
Kent Johnson wrote:
> Nader Emami wrote:
>
>> L.S.,
>>
>> I have used the profile module to measure some thing as the next command:
>>
>> profile.run('command', 'file')
>>
>> But this make a binary file! How can I write the result of 'profile'
>> in a ascii file? Others how can I read (or convert) the binary file to
>> am ascii file?
>
>
> Use an instance of pstats.Stats to interpret the results:
>
> from pstats import Stats
> s = Stats('file')
> s.print_stats()
>
> etc.
> http://docs.python.org/lib/profile-stats.html
>
> Kent
I got the same result as the execution of command. But I would like to
write to the an external 'ascii' file!
Thanks!
More information about the Python-list
mailing list