I would first try to wrap it inside a command with a return value and call that command from inside the logic. Exception handling tricks seldom end in happiness :) On Dec 7, 2012 9:36 PM, "Gareth Bell" <[email protected]> wrote:
> Yeah that's right, within a button callback. > > I'll have a look into the "while 1" trick. Failing that - I guess I'll > have to find another solution. > > Thanks for your help > > > ________________________________ > > From: [email protected] on behalf of Raffaele > Fragapane > Sent: Thu 06/12/2012 22:49 > To: [email protected] > Subject: Re: Python: subprocess caching > > > Glad it was of help. > I might be missing something, what do you mean "within logic"? > Inside a PPG's logic? You have it in a button callback or where? > > Subprocess can be finnicky if run inside something that does its own black > magic garbage collection, like most UI elements do. > There are tricks like using "while 1" and trying excepting something > inside to exit which will stall the caller enough for subprocess to finish > doing its thing, but it might or might not work out for you, or even be > viable. > > > > On Fri, Dec 7, 2012 at 2:12 AM, Gareth Bell < > [email protected]> wrote: > > > > > Hi Raff, > > > > That's awesome. > > > > Forgive my ignorance but is it possible to run subprocess.Popen > within logic? As it is currently written it works outside of logic but not > within it. > > > > g > > > > >

