问题
I've got different results while trying to run the same following code:
import PyPDF2, pdfplumber, re, pandas, sys, os, time, glob
import numpy as np
from read_pdf_function import *
from os import listdir
from os.path import isfile, join
from time import gmtime, strftime,localtime
from multiprocessing import Pool
path=glob.glob('SFCR\*.pdf')
with Pool(8) as p:
fPage = p.map(find_data, path)
print(fPage)
(find_data is a function that I wrote in read_pdf_function, it returns the first page with data of a pdf)
-If I run the file pressing the F5 key, the script returns nothing and just keeps runing.
-If I run selecting the whole code then pressing F9, the script returns the values I'm looking for.
I've never been in front of this case. What can be done to let code be executed in both ways?
Thanks in advance!
来源:https://stackoverflow.com/questions/55952689/spyder-different-results-depending-on-if-i-run-code-with-f5-or-f9