How to modify a program while it's running?

2008-12-16 Thread Joe Strout
Here's my situation: I'm making an AIM bot, but the AIM server will get annoyed if you log in too frequently (and then lock you out for a while). So my usual build-a-little, test-a-little methodology doesn't work too well. So I'd like to restructure my app so that it can stay running and

Re: How to modify a program while it's running?

2008-12-16 Thread Craig Allen
On Dec 16, 10:25 am, Joe Strout j...@strout.net wrote: Here's my situation: I'm making an AIM bot, but the AIM server will get annoyed if you log in too frequently (and then lock you out for a while). So my usual build-a-little, test-a-little methodology doesn't work too well. So I'd like

Re: How to modify a program while it's running?

2008-12-16 Thread Arnaud Delobelle
Joe Strout j...@strout.net writes: Here's my situation: I'm making an AIM bot, but the AIM server will get annoyed if you log in too frequently (and then lock you out for a while). So my usual build-a-little, test-a-little methodology doesn't work too well. So I'd like to restructure my

Re: How to modify a program while it's running?

2008-12-16 Thread Ivan Illarionov
On Dec 16, 11:25 pm, Joe Strout j...@strout.net wrote: Here's my situation: I'm making an AIM bot, but the AIM server will   get annoyed if you log in too frequently (and then lock you out for a   while).  So my usual build-a-little, test-a-little methodology doesn't   work too well. So I'd

Re: How to modify a program while it's running?

2008-12-16 Thread Steven D'Aprano
On Tue, 16 Dec 2008 13:25:17 -0700, Joe Strout wrote: Here's my situation: I'm making an AIM bot, but the AIM server will get annoyed if you log in too frequently (and then lock you out for a while). So my usual build-a-little, test-a-little methodology doesn't work too well. Ouch! What AIM

Re: How to modify a program while it's running?

2008-12-16 Thread James Mills
On Wed, Dec 17, 2008 at 11:26 AM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: So I'd like to restructure my app so that it can stay running and stay logged in, yet I can still update and reload at least most of the code. But I'm not sure what's the best way to do this. Should I

Re: How to modify a program while it's running?

2008-12-16 Thread Aaron Brady
On Dec 16, 7:26 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Tue, 16 Dec 2008 13:25:17 -0700, Joe Strout wrote: So I'd like to restructure my app so that it can stay running and stay logged in, yet I can still update and reload at least most of the code. But I'm not

Re: How to modify a program while it's running?

2008-12-16 Thread James Mills
@Aaron Your code and suggestion is way too complicated. Just register your objects. When you need to reload your module, destroy the existing objects and re-creat them. This works well assuming you have a stable running core that maintains the connection and that code doesn't change much.

Re: How to modify a program while it's running?

2008-12-16 Thread Aaron Brady
On Dec 16, 7:54 pm, James Mills prolo...@shortcircuit.net.au wrote: @Aaron Your code and suggestion is way too complicated. Just register your objects. When you need to reload your module, destroy the existing objects and re-creat them. This works well assuming you have a stable running

Re: How to modify a program while it's running?

2008-12-16 Thread Paul Rubin
Joe Strout j...@strout.net writes: So I'd like to restructure my app so that it can stay running and stay logged in, yet I can still update and reload at least most of the code. But I'm not sure what's the best way to do this. Should I move the reloadable code into its own module, and then

Re: How to modify a program while it's running?

2008-12-16 Thread Aaron Brady
On Dec 16, 11:47 pm, Paul Rubin http://phr...@nospam.invalid wrote: Joe Strout j...@strout.net writes: So I'd like to restructure my app so that it can stay running and stay logged in, yet I can still update and reload at least most of the code.  But I'm not sure what's the best way to do