티스토리 뷰
import sys, time, threading
def spin_cursor():
while True:
for cursor in '|/-\\':
sys.stdout.write(cursor)
sys.stdout.flush()
time.sleep(0.1) # adjust this to change the speed
sys.stdout.write('\b')
if done:
return
# start the spinner in a separate thread
done = False
spin_thread = threading.Thread(target=spin_cursor)
spin_thread.start()
# do some more work in the main thread, or just sleep:
time.sleep(10)
# tell the spinner to stop, and wait for it to do so;
# this will clear the last cursor before the program moves on
done = True
spin_thread.join()
# continue with other tasks
sys.stdout.write("all done\n")
공부할게 많다.
'개발 > Python' 카테고리의 다른 글
패쇄망에서 환경 구축하기 (0) | 2020.02.03 |
---|---|
selenium 으로 화면 캡쳐하기 (0) | 2020.02.03 |
docker 위에 jupyter 설치하기 (0) | 2018.05.07 |
virtualenv 를 이용해서 파이썬 환경을 셋팅하자 (0) | 2018.02.07 |
[기본 3]Python의 연산자 (0) | 2017.12.30 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- __code__
- bootrap
- MAC
- anaconda env
- Restore
- docker
- python의 Reflection
- Selenium
- pip freeze #패쇄망 #wheel
- elasticsearch
- Lodash
- 호스트와 시간맞추기
- 동적클래스생성
- HashMap.getOrDefault
- jupyter lab
- pyenv
- jqzip
- vscode
- selenium #chromedriver
- importlib
- virturalenv
- conda init
- redmine plugin
- sorted
- jqgrid
- inspect.py
- gitlab
- backup
- zsh
- covid19
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
글 보관함