p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/python-pycurl-7.19.0/tests/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /usr/share/doc/python-pycurl-7.19.0/tests/test_getinfo.py
#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
# vi:ts=4:et
# $Id: test_getinfo.py,v 1.18 2003/05/01 19:35:01 mfx Exp $

import time
import pycurl


## Callback function invoked when progress information is updated
def progress(download_t, download_d, upload_t, upload_d):
    print "Total to download %d bytes, have %d bytes so far" % \
          (download_t, download_d)

url = "http://www.cnn.com"

print "Starting downloading", url
print
f = open("body", "wb")
h = open("header", "wb")
c = pycurl.Curl()
c.setopt(c.URL, url)
c.setopt(c.WRITEDATA, f)
c.setopt(c.NOPROGRESS, 0)
c.setopt(c.PROGRESSFUNCTION, progress)
c.setopt(c.FOLLOWLOCATION, 1)
c.setopt(c.MAXREDIRS, 5)
c.setopt(c.WRITEHEADER, h)
c.setopt(c.OPT_FILETIME, 1)
c.perform()

print
print "HTTP-code:", c.getinfo(c.HTTP_CODE)
print "Total-time:", c.getinfo(c.TOTAL_TIME)
print "Download speed: %.2f bytes/second" % c.getinfo(c.SPEED_DOWNLOAD)
print "Document size: %d bytes" % c.getinfo(c.SIZE_DOWNLOAD)
print "Effective URL:", c.getinfo(c.EFFECTIVE_URL)
print "Content-type:", c.getinfo(c.CONTENT_TYPE)
print "Namelookup-time:", c.getinfo(c.NAMELOOKUP_TIME)
print "Redirect-time:", c.getinfo(c.REDIRECT_TIME)
print "Redirect-count:", c.getinfo(c.REDIRECT_COUNT)
epoch = c.getinfo(c.INFO_FILETIME)
print "Filetime: %d (%s)" % (epoch, time.ctime(epoch))
print
print "Header is in file 'header', body is in file 'body'"

c.close()
f.close()
h.close()
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
December 20 2023 04:36:12
0 / 0
0755
test.py
1.907 KB
April 10 2007 13:25:17
0 / 0
0644
test_cb.py
0.677 KB
April 21 2003 18:46:10
0 / 0
0644
test_debug.py
0.332 KB
April 21 2003 18:46:10
0 / 0
0644
test_ftp.py
0.282 KB
August 24 2006 07:36:03
0 / 0
0644
test_getinfo.py
1.386 KB
May 01 2003 19:35:01
0 / 0
0644
test_gtk.py
2.669 KB
March 30 2005 12:05:50
0 / 0
0644
test_internals.py
5.478 KB
November 05 2016 15:10:52
0 / 0
0644
test_memleak.py
1.1 KB
May 01 2003 16:48:54
0 / 0
0644
test_multi.py
0.66 KB
March 11 2005 13:24:45
0 / 0
0644
test_multi2.py
1.705 KB
April 10 2007 13:26:45
0 / 0
0644
test_multi3.py
2.02 KB
March 11 2005 13:24:45
0 / 0
0644
test_multi4.py
1.367 KB
March 11 2005 13:24:45
0 / 0
0644
test_multi5.py
1.438 KB
March 11 2005 13:24:45
0 / 0
0644
test_multi6.py
1.5 KB
March 11 2005 13:24:45
0 / 0
0644
test_multi_socket.py
1.879 KB
November 10 2006 15:03:05
0 / 0
0644
test_multi_socket_select.py
2.39 KB
June 11 2008 18:11:46
0 / 0
0644
test_multi_timer.py
1.708 KB
November 10 2006 12:25:29
0 / 0
0644
test_multi_vs_thread.py
5.638 KB
April 12 2005 03:39:01
0 / 0
0644
test_post.py
0.575 KB
August 05 2008 20:43:37
0 / 0
0644
test_post2.py
0.522 KB
March 03 2005 10:00:40
0 / 0
0644
test_post3.py
0.785 KB
June 21 2004 11:24:18
0 / 0
0644
test_reset.py
2.19 KB
November 05 2016 15:10:52
0 / 0
0644
test_share.py
0.697 KB
June 13 2006 19:04:44
0 / 0
0644
test_socketopen.py
0.43 KB
August 22 2008 17:14:40
0 / 0
0644
test_stringio.py
0.462 KB
April 21 2003 18:46:11
0 / 0
0644
test_write_abort.py
0.647 KB
November 05 2016 15:10:52
0 / 0
0644
test_xmlrpc.py
0.727 KB
April 21 2003 18:46:11
0 / 0
0644
util.py
0.927 KB
April 21 2003 18:46:11
0 / 0
0644
util.pyc
0.98 KB
November 05 2016 15:10:53
0 / 0
0644