简体   繁体   中英

multi threading in python

I have a program or function printValue() that prints some value. But it takes some time(say 5 min) to execute the function. So, How can I implement multithreading or some technique in python so that within that 5 min I can print the % of completion. ie How can I achieve the following output.

#program starts.
#-------------- __%complete --------------#
#output_of_printValue()
#end program

在Leonardo.ZI评论了一下之后,我找到了python-progressbar作为我的答案!

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM