0

I'm running a python script that takes a data measurement once every 10 minutes forever. The problem is that it requires I run a httpget.exe that crashes constantly. When it crashes, a popup window appears and tells me that it's "Not Responding" and puts my python script on hold until I press "enter" in the popup or click "ok", then the script continues normally.

Is there a way to make certain programs in windows 7 not have those popup menus appear? So my script would just run over any "Not Responding" errors?

I've tried running a "kill()" in python, but as soon as the httpget.exe stops responding, the python script stops too. I just cant be around my computer all the time pressing "enter" when the window pops up.

What's the best way to go about this?

Thank you!

1 Answers1

0

Perhaps you should not use an external program and use something on the standard library, as in get the content of the page and strip it using string functions:

import urllib2
url = "http://httpbin.org/get"
response = urllib2.urlopen(url)
print response.read()

Or the file:

import urllib
urllib.urlretrieve ("http://www.example.com/songs/mp3.mp3", "mp3.mp3")

More about this: https://stackoverflow.com/a/22776/349420

Community
  • 1
  • 1
Esparta Palma
  • 735
  • 5
  • 10