Thank you for your report.
Here are my guesses:
(1) if you are using a system like virtualenv, the different versions of
python are getting mixed up. Are you?
(2) maybe you are running a different version of ipython and I had not
realised the dependency. Does the following work (in a Python shell):
from IPython.Shell import IPShellEmbed
?
(The above is what jug actually runs and it is failing so you get the
error you saw).
HTH
--
Luis Pedro Coelho | Carnegie Mellon University | http://luispedro.org
Oh, you can always save it to a file.
from jug import TaskGenerator
from time import sleep
@TaskGenerator
def is_prime(n):
sleep(1.)
for j in xrange(2,n-1):
if (n % j) == 0:
return False
return True
@TaskGenerator
def save_results(filename, is_prime):
output = file(filename, 'w')
for i,p in enumerate(is_prime):
status = "is not prime"
if p: status = "is prime"
print >>output, 2+i, status
output.close()
primes100 = map(is_prime, xrange(2,101))
save_results('primes.txt', primes100)
HTH,