Code: Alles auswählen
import os
import MySQLdb
verbindung=MySQLdb.connect(host='localhost',db='watchdog',user='root',passwd='test')
c=verbindung.cursor()
c.execute('USE watchdog')
while True:
x=raw_input("Bitte Port eingeben:")
print x
anfrage4='''
Select Death
FROM watchdog
WHERE Port='''+x
c.execute(anfrage4)
death=c.fetchone()[0]
print death
While True:
if ping == 0:
i=0
print i
print 'ok'
Das klappt auch alles. Nur jetzt kommt mein Problem und ich hoffe ihr könnt mir helfen

Code: Alles auswählen
else:
i=i+1
print i
if i == death:
print 'server wird erneut angepingt'
break
else:
print 'server wurde angepingt'
continue
Edit (Leonidas): Titel geändert. *grml*