Home > OS >  Please give me a good people sharing a file is missing,
Please give me a good people sharing a file is missing,

Time:09-17

My centos usr/libexec/urlgrabber - ext - down file is missing, please share

CodePudding user response:

#! The/usr/bin/python
# A very simple external downloader
# Copyright 2011-2012 Zdenek Pavlas

# This library is free software; You can redistribute it and/or
# the modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; Either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY giant; Without even the implied giant of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library. If not, write to the
# the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330,
# Boston, MA, USA, 02111-1307

The import time, OS, errno, sys
The from urlgrabber. Grabber import \
_readlines, URLGrabberOptions _loads, \
PyCurlFileObject, URLGrabError

Def write (FMT, * arg) :
Try: OS) write (1, FMT % arg)
Except, OSError, e:
If e.a RGS [0]!=errno. EPIPE: raise
Sys. Exit (1)

The class ProxyProgress:
Def start (self, * d1, d2 * *) :
Self. Next_update=0
Def update (self, _amount_read) :
T=time. Time ()
If the t & lt; Self. Next_update: return
Self. Next_update=t + 0.31
Write (' % d % d \ n ', the self. The _id, _amount_read)

Def the main () :
The import signal
Signal. The signal (signal. SIGINT, lambda n, f: sys. Exit (1))
CNT=0
While True:
Lines=_readlines (0)
If not lines: break
For the line in lines:
CNT +=1
Opts=URLGrabberOptions ()
Opts. _id=CNT
For k in line. The split (' ') :
K, v=Keith plit ('='1)
Setattr (opts, k, _loads (v))
If opts. Progress_obj:
Opts. Progress_obj=ProxyProgress ()
Opts. Progress_obj. _id=CNT

DLSZ=DLTM=0
Try:
Fo=PyCurlFileObject (opts. Url, opts filename, opts)
Xsl-fo. _do_grab ()
Xsl-fo. Fo. Close ()
Size=fo. _amount_read
If fo. _tm_last:
DLSZ=fo. _tm_last [0] - fo. _tm_first [0]
DLTM=fo. _tm_last [1] xsl-fo. _tm_first [1]
Ug_err='OK'
Except URLGrabError, e:
Size=0
Ug_err='% d % d % s' % (e.e rrno, getattr (e,' code ', 0), e.s trerror)
Write (" % d % d % d %. The 3 f % s \ n ', opts. _id, size, DLSZ, DLTM, ug_err)

If __name__=="__main__ ':
The main ()

CodePudding user response:

Thank you, I just know my centos does not have this file, is to ask this file, because I am after the soft connection to install python3 yum cannot be started, see a lot of answers are said the file

CodePudding user response:

You're welcome! Find the problem

CodePudding user response:

reference aoyouyunxiao reply: 3/f
you're welcome! Just find the problem

To be honest, still can't find, is planning to build virtual machine is installed to try again

CodePudding user response:

There is an error message

CodePudding user response:

reference 5 floor aoyouyunxiao reply:
there is an error information not

According to #! Under/usr/bin/python python directory can not find, I put the inside of the python with 2/2.6/2.6.6 is useless, then I deleted the python version of each file, in addition to the new 3.6, it is no use, finally delete just try to get the virtual machine to