Hi,
I'm using python 2.5 on Vista and writing a Genetic Program in Python. I was wondering is there a way to run a script from within another one but in sandbox environment? If there is can it automatically kill the script if it runs too long? I know you can use the exec() function but it can override variables in the current script and could get stuck in an infinite loop. I'm wondering because sometimes the program being tested gets in an infinite loop like below and I need the program executing it to continue running.
[code=python]
i = 10
while i <= 10:
print i
i -= 1
[/code]
I'm using python 2.5 on Vista and writing a Genetic Program in Python. I was wondering is there a way to run a script from within another one but in sandbox environment? If there is can it automatically kill the script if it runs too long? I know you can use the exec() function but it can override variables in the current script and could get stuck in an infinite loop. I'm wondering because sometimes the program being tested gets in an infinite loop like below and I need the program executing it to continue running.
[code=python]
i = 10
while i <= 10:
print i
i -= 1
[/code]
Comment