FiSGO.PrimesHandler.primes
- primes(n, primes_path='/home/docs/checkouts/readthedocs.org/user_builds/fisgo/checkouts/latest/FiSGO/PrecomputedData/BuiltinPrimes.txt')[source]
Given an integer n, returns a generator of the first n primes in file primes_path.
File primes_path is specified to PRIMES_PATH by default, containing 10^5 first primes; primes_path should refer to a file where each line contains a single prime number, in ascending order, see PRIMES_PATH for an example of the required format.
If n exceeds the maximum number of prime numbers available in the file primes_path, the function will raise a ValueError.