py 3単行リフレッシュ表示を実現

609 ワード

# coding=utf-8
import time

count=0
try:
	while True:
		char_sets=['\\','|','/','-']
		msg='[%s] is testing' % char_sets[count % 4]
		# print(" %s is testing",%(chart_sets[count%4]))
		print("\r"+msg,end='')

	            # msg = '[%s] %s found, %s scanned in %.1f seconds, %s groups left' % (
	            #     char_set[count % 4], found_count.value, scan_count.value, time.time() - start_time, groups_count)
	            # print_msg(msg)

		count+=1
		time.sleep(0.3)


except Exception as e:
	print(str(e))