[johnbmudd@gmail.com: Re: [twill] mail monitor memory leak?]

16 views
Skip to first unread message

C. Titus Brown

unread,
Mar 30, 2009, 4:13:49 PM3/30/09
to twill-dev
----- Forwarded message from John Mudd <john...@gmail.com> -----

Date: Sun, 11 Nov 2007 17:46:29 -0500
From: John Mudd <john...@gmail.com>
To: ti...@idyll.org
Subject: Re: [twill] mail monitor memory leak?

I've revisited this several times but never resolved it in a normal
way. Here's the code I finally added in a desperate moment. Works
well.


> currDay = time.strftime('%a')
...
> # Is it a new day?
> if currDay != time.strftime('%a'):
> print
> print 'Restart this program.'
> os.execl(sys.argv[0])

John


On 4/4/06, Titus Brown <ti...@caltech.edu> wrote:
> -> Here's the guts of a script to monitor a SquirrelMail web mail account
> -> and forward new emails to my cell phone. It's working well but it
> -> consumes about 35 MB per day. Any suggestions on how to track down
> -> the leak?
>
> [ munch ]
>
> Nice script!
>
> You might try 'reset_browser()' after the 'sleep'; that will get rid of
> the page history, which is the most likely culprit.
>
> Note that you can use
>
> b = twill.get_browser()
> b.get_page()
>
> to get the HTML, and
>
> links = b._browser.links()
>
> to get all of the links.
>
> cheers,
> --titus
>

----- End forwarded message -----

--
C. Titus Brown, c...@msu.edu

Reply all
Reply to author
Forward
0 new messages