Eclipse seems to terminate long running scripts automatically. I have this simple script written in Python and it runs fine on IDLE, however when I run it in eclipse the program terminates without printing any output values in the console. Is there something that I could modify in the settings to control this?
def main():
max = 8000
for i in getPrimes():
if(i <= max):
print(i, end=" ")
else:
return
def getPrimes():
testNum = 2
isPrime = True
while True:
for i in range(2, testNum):
if testNum % i == 0:
isPrime = False
continue
if isPrime:
yield testNum
else:
isPrime = True
testNum += 1
if __name__ == "__main__": main()