I run the following script in Spyder python environment under Ubuntu 14.04:
import os
import dbf
x1 = '/home/beata/Documents/Bias_coorection/Power_pr/CNRM_pr_power1965'
x2 = '/home/beata/Documents/Bias_coorection/Power_pr/CNRM_pr_power1966'
x3 = '/home/beata/Documents/Bias_coorection/Power_pr/CNRM_pr_power1967'
x = [x1, x2, x3]
def conv(x):
file_name = os.path.basename(x)
dbf_file_name = file_name + ".dbf"
return dbf_file_name
def dbf_from_csv(x):
dbf.from_csv(x, conv(x))
from multiprocessing import Pool
p = Pool(2)
p.map(dbf_from_csv, x)
p.close()
p.join()
When I run this scrip I do not get back prompt in the console after the run is finished. When I type top
in terminal it seems python is stacked. Could someone suggest me a solution how I can get to know if the conversations are ready? Thank you for your help in advance!
if you use the IPython console you get something which looks loke this:
In [2]:
in the console while if you use a Python console you will get
">>>"
after the script has been run. Otherwise you can of course just add a line like
print "FINISHED"
as the last line of your code
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.