You can use Wilson's theorem to seriously optimize the is_prime() function. It is also a good idea to turn it into a lambda function if you also want shorter code.
factorial = lambda a:a and a*x(a-1)or 1
is_prime = lambda b:factorial(b-1)%b==b-1
You should then nest a while loop in a for loop to get the nth prime.