I am just playing around with threading and subprocess and found that
the following program will hang up and never terminate every now and
again.
import threading
import subprocess
import time
def targ():
p = subprocess.Popen(["/bin/sleep", "2"])
while p.poll() is None:
time.sleep(1)
Possibly. I wonder what the difference(s) is(are)?
On Sat, Apr 7, 2012 at 5:54 PM, Jason Friedman wrote:
>> I am just playing around with threading and subprocess and found that
>> the following program will hang up and never terminate every now and
>> again.
>>
>> import threading
>> import subp
Fabian López wrote:
> Hi colegues,
> do you know the most efficient way to put the content of an html file
> into a mySQL database?Could it be this one?:
> 1.- I have the html document in my hard disk.
> 2.- Then I Open the file (maybe with fopen??)
> 3.- Read the content (fread or similar)
> 4.-
Bret wrote:
> Does anyone know of a package that can be used to "fix" bad formatting
> in Python code? I don't mean actual errors, just instances where
> someone did things that violate the style guide and render the code
> harder to read.
>
> If nothing exists, I'll start working on some sed scri
On Wed, Aug 4, 2010 at 2:44 PM, Chris Hare wrote:
> Don't say cron :
>
> I want to have a section of my code executed at 15 minute intervals. I am
> using Threading.timer, but it is causing a problem sinxe I am using sqlite3
> and the thread support gives me an error, which aborts part of my co
On Sun, Aug 8, 2010 at 10:01 AM, Tim Harig wrote:
> On 2010-08-08, Costin Gament wrote:
>> Thank you for your answer, but it seems I didn't make myself clear.
>> Take the code:
>> class foo:
>> a = 0
>> b = 0
>> c1 = foo()
>> c1.a = 5
>> c2 = foo()
>> print c2.a
>> 5
>>
>> Somehow, when I try