- 전체
- Python 일반
- Python 수학
- Python 그래픽
- Python 자료구조
- Python 인공지능
- Python 인터넷
- Python SAGE
- wxPython
- TkInter
- iPython
- wxPython
- pyQT
- Jython
- django
- flask
- blender python scripting
- python for minecraft
- Python 데이터 분석
- Python RPA
- cython
- PyCharm
- pySide
- kivy (python)
python 으로 torrent 파일 컨텐츠 다운로드
2014.05.13 19:55
[춫처] http://stackoverflow.com/questions/5400828/how-to-write-a-simple-bittorrent-application
You should try libtorrent (rasterbar). http://libtorrent.org
If you want to write your client in python, on linux, install it with:
sudo apt-get install python-libtorrent
A very simple example of python code to use it to download a torrent:
import libtorrent as lt
import time
import sys
ses = lt.session()
ses.listen_on(6881, 6891)
info = lt.torrent_info(sys.argv[1])
h = ses.add_torrent({'ti': info, 'save_path': './'})
print 'starting', h.name()
while (not h.is_seed()):
s = h.status()
state_str = ['queued', 'checking', 'downloading metadata', \
'downloading', 'finished', 'seeding', 'allocating', 'checking fastresume']
print '\r%.2f%% complete (down: %.1f kb/s up: %.1f kB/s peers: %d) %s' % \
(s.progress * 100, s.download_rate / 1000, s.upload_rate / 1000, \
s.num_peers, state_str[s.state]),
sys.stdout.flush()
time.sleep(1)
print h.name(), 'complete'본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
댓글 0
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|
| 17 | Tkinter Summary [Tkinter 요약] | 졸리운_곰 | 2014.10.14 | 3203 |
| 16 | An Introduction To Tkinter TkInter에 대한 소개 | 졸리운_곰 | 2014.10.14 | 2649 |
| 15 |
tkinter_nmt.pdf
| 졸리운_곰 | 2014.10.14 | 6234 |
| 14 |
tkinter.pdf
| 졸리운_곰 | 2014.10.14 | 6858 |
| 13 |
wxpython_in_action_wxact.pdf
| 졸리운_곰 | 2014.10.14 | 7113 |
| 12 |
wxPython 2.8 Application Development Cookbook (2010).pdf
| 졸리운_곰 | 2014.10.14 | 2773 |
| 11 |
The wxPython tutorial.pdf
| 졸리운_곰 | 2014.10.14 | 2875 |
| 10 |
tkinter-python-intro.pdf
| 졸리운_곰 | 2014.10.14 | 7646 |
| 9 |
python-and-tkinter-programming.pdf
| 졸리운_곰 | 2014.10.14 | 7918 |
| 8 | Python 문법정리 | 졸리운_곰 | 2014.05.28 | 4393 |
| » | python 으로 torrent 파일 컨텐츠 다운로드 | 졸리운_곰 | 2014.05.13 | 1797 |
| 6 |
NumMethodPython.pdf 파이썬 수치해석학 python numerical methods
| 졸리운_곰 | 2014.04.23 | 826 |
| 5 | 파이썬에서 url 인코딩 / 디코딩 | 졸리운_곰 | 2014.03.03 | 1501 |
| 4 | Python - Linux: Parse Network Stats From ifconfig | 졸리운_곰 | 2014.02.14 | 420 |
| 3 |
[python] mechanize 와 Beautifup soup를 이용한 웹 사이트 정보 수집
| 가을의 곰을... | 2012.10.11 | 5552 |
| 2 | [파이썬] scrapy 로 웹 사이트 크롤링 | 가을의 곰을... | 2012.10.09 | 8939 |
| 1 | 파이썬 코드 50라인으로 웹 크롤러 만들기 | 가을의 곰을... | 2012.10.05 | 9539 |

