problem with hot shot stats
HI All,
I am getting problem in using hotshot profiler.
When I hotshot with lineevents=0, it works fine,
but when I use lineevents=1, I get error in stats
here is my code:
import hotshot, hotshot.stats
prof = hotshot.Profile("test.prof",lineevents=1)
prof.start()
main()
prof.stop()
prof.close()
stats = hotshot.stats.load("test.prof")
stats.strip_dirs()
stats.sort_stats('time', 'calls')
stats.print_stats(20)
I get following error:
File "test.py", line 1371, in benchmark
stats = hotshot.stats.load("test.prof")
File "/usr/lib64/python2.4/hotshot/stats.py", line 12, in load
return StatsLoader(filename).load()
File "/usr/lib64/python2.4/hotshot/stats.py", line 29, in load
for event in log:
File "/usr/lib64/python2.4/hotshot/log.py", line 113, in next
filename, firstlineno, funcname = self._stack[-1]
IndexError: list index out of range
Can anybody help to figure out the problem please?
--
http://mail.python.org/mailman/listinfo/python-list
Re: problem with hot shot stats
But I couldn't find any way to get lineevents in cProfile On Oct 11, 3:49 am, "Klaas" <[EMAIL PROTECTED]> wrote: > Monu wrote: > > HI All, > > I am getting problem in usinghotshotprofiler. > > When Ihotshotwith lineevents=0, it works fine, > > but when I use lineevents=1, I get error in stats<> > > > Can anybody help to figure out the problem please?hotshothas never reached > > production-ready stability, imo. Use the new > cProfile module in python2.5 > > -Mike -- http://mail.python.org/mailman/listinfo/python-list
shelve file name extention
Hi All, When I am using shelve on my local machine it generates the db file as given filename. But in another machine it's generating .dat and .dir. can anyone tell me how can I force sheve module to write the db in .dir and .dat, instead of ? Do I have to install a specific version of the python? Thanks... Monu -- http://mail.python.org/mailman/listinfo/python-list
Re: shelve file name extention
On Sep 8, 1:47 pm, [EMAIL PROTECTED] wrote: > Monu> When I am using shelve on my local machine it generates the db > Monu> file as given filename. But in another machine it's generating > Monu> .dat and .dir. can anyone tell me how can I force sheve > Monu> module to write the db in .dir and .dat, > Monu> instead of ? Do I have to install a specific version of > Monu> the python? > > Shelve is just a thin layer on top of a concrete db file module. Sounds > like on your two machines there are different underlying db file modules > available. You're pretty much at the mercy of those modules as to file > naming. All you are giving it when opening a shelve file is the prefix. > > Skip Thanks Skip. So Can't I choose which module to use. Is there any preferance on which shelve chooses these modules? -- http://mail.python.org/mailman/listinfo/python-list
Re: shelve file name extention
On Sep 8, 1:47 pm, [EMAIL PROTECTED] wrote: > Monu> When I am using shelve on my local machine it generates the db > Monu> file as given filename. But in another machine it's generating > Monu> .dat and .dir. can anyone tell me how can I force sheve > Monu> module to write the db in .dir and .dat, > Monu> instead of ? Do I have to install a specific version of > Monu> the python? > > Shelve is just a thin layer on top of a concrete db file module. Sounds > like on your two machines there are different underlying db file modules > available. You're pretty much at the mercy of those modules as to file > naming. All you are giving it when opening a shelve file is the prefix. > > Skip Thanks Skip. So Can't I choose which module to use. Is there any preferance on which shelve chooses these modules? -- http://mail.python.org/mailman/listinfo/python-list
Statement orders
Hi I am making a gui based tool. When user preses a perticular button I
am running a heavy command, before this I want to say user to wait with
a image showing infront of her.
My code is like:
def loadData(self):
top=Toplevel(self.parent)
top.focus_set()
self.parent.wm_title("Loading Data...")
os.system('a heavy command')
os.system('another heavy command)
top.destroy()
Now when I apply it, it first runs the os.system commands then it shows
the top level.
I tried with putting sleep just before os.system() it didn't help.
Is some statement reordering going on, or I am missing something?
--
http://mail.python.org/mailman/listinfo/python-list
plateform info.
Hi I want to know whether the program is being run on windows or on Xnix. Is there any variable or method which tells me that it's windows? -- http://mail.python.org/mailman/listinfo/python-list
