rasbt / pyprind

PyPrind - Python Progress Indicator Utility
BSD 3-Clause "New" or "Revised" License
550 stars 66 forks source link

Added resource monitoring and string formatted dating to __repr__ #5

Closed grromrell closed 10 years ago

grromrell commented 10 years ago

Sebastian,

I really like you package and use it pretty frequently at work. In the course of using it I thought some resource monitoring would be really nice as I often let things run and come back and check on them long after they have finished. I have had this functionality in my local pyprind package for a while now and thought it might be worth merging it in.

Changelog

-changed end attribute of Prog to a time.time instance, instead of a time delta -added a total_time attribute to Prog to serve the functionality of the old end attribute -added psutil dependency to allow for resource monitoring -added several new objects to the repr function with the above changes (see attached image)

If you do not like the step of adding a non-standard dependency (psutil) then take a look at the other branch on my forked repo (grromrell/optional_psutil_update). There the psutil functionality is only used when explicitly called for.

image

rasbt commented 10 years ago

Greg, thank you so much for doing this! It's really a great feature - I love it! I just tried it out and will merge it now. I have updated the documentation, modified the setup.py, and changed the default from monitor=True to monitor=False, so that a user without psutil won't run into troubles!

I really appreciate your work, thanks again!