资源简介
在windows下安装gevent的安装包,安装方法很简单。具体参考我在csdn的博客。
http://blog.csdn.net/ruguokeyi110/article/details/47725545

代码片段和文件信息
#!/usr/bin/env python
#
# Hi There!
# You may be wondering what this giant blob of binary data here is you might
# even be worried that we‘re up to something nefarious (good for you for being
# paranoid!). This is a base85 encoding of a zip file this zip file contains
# an entire copy of pip.
#
# Pip is a thing that installs packages pip itself is a package that someone
# might want to install especially if they‘re looking to run this get-pip.py
# script. Pip has a lot of code to deal with the security of installing
# packages various edge cases on various platforms and other such sort of
# “tribal knowledge“ that has been encoded in its code base. Because of this
# we basically include an entire copy of pip inside this blob. We do this
# because the alternatives are attempt to implement a “minipip“ that probably
# doesn‘t do things correctly and has weird edge cases or compress pip itself
# down into a single file.
#
# If you‘re wondering how this is created it is using an invoke task located
# in tasks/generate.py called “installer“. It can be invoked by using
# ‘‘invoke generate.installer‘‘.
import os.path
import pkgutil
import shutil
import sys
import struct
import tempfile
# Useful for very coarse version differentiation.
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
if PY3:
iterbytes = iter
else:
def iterbytes(buf):
return (ord(byte) for byte in buf)
try:
from base64 import b85decode
except ImportError:
_b85alphabet = (b“0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ“
b“abcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_‘{|}~“)
def b85decode(b):
_b85dec = [None] * 256
for i c in enumerate(iterbytes(_b85alphabet)):
_b85dec[c] = i
padding = (-len(b)) % 5
b = b + b‘~‘ * padding
out = []
packI = struct.Struct(‘!I‘).pack
for i in range(0 len(b) 5):
chunk = b[i:i + 5]
acc = 0
try:
for c in iterbytes(chunk):
acc = acc * 85 + _b85dec[c]
except TypeError:
for j c in enumerate(iterbytes(chunk)):
if _b85dec[c] is None:
raise ValueError(
‘bad base85 character at position %d‘ % (i + j)
)
raise
try:
out.append(packI(acc))
except struct.error:
raise ValueError(‘base85 overflow in hunk starting at byte %d‘
% i)
result = b‘‘.join(out)
if padding:
result = result[:-padding]
return result
def bootstrap(tmpdir=None):
# Import pip so we can use it to install pip and maybe setuptools too
import pip
from pip.commands.install import InstallCommand
# Wrapper to provide default certificate with the lowest priority
class CertInstallCommand(InstallCommand):
def parse_args(sel
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 260439 2015-08-17 14:51 gevent-1.0.2-cp27-none-win32.whl
文件 1413348 2015-08-17 14:46 get-pip.py
----------- --------- ---------- ----- ----
1673787 2
- 上一篇:快速上手指南v4.0.0.pdf
- 下一篇:maven+ajax+json
相关资源
- AE开发Windows最短路径分析
-
Windows em
bedded Compact 2013 应用开发调 - 黑苹果硬件兼容检测和查询软件
- Uninstall_Cortana_WINCLIENT.CN.rar
- VMware65_SLP_DeLLSLIC2.1
- Windows异步套接字网络编程
- WINDOWS98启动盘镜像Win98.IMA
- 仿windows记事本
- windows7用的,非常漂亮的透明计时器
- windows下制作macOS安装U盘,绝对简单好
- keil vcom windows 7 64bit 驱动
- windows ce 系统的GPIO驱动程序
- TCP 发包工具(windows)
- 微软的可以删除系统卸不干净的软件
- windows下生成MD5值的工具(WinMD5)
- windows cygwin ns2安装步骤
- VxWorks TCPIP协议栈
- 进程的管道通信编制一段程序,实现
- WinAPI 函数库(大全)
- 解决在Windows XP SP2下不能显示验证码的
- 加快Windows XP操作系统开机速度
- Windows 1.0 软盘镜像
- Windows下访问LINUX的利器-SSH
- ChilledWindows.exe(玩笑病毒)
- NDK-R12B windows-x86_64百度云盘
- windows3.2简体中文版,虚拟机文件
- Windows 3.0 安装软盘(3.5 720k)
- WINDOWS内核安全编程 寒江独钓 光盘源
- 寒江独钓-Windows内核安全编程(完整版
- 实现Windows与Linux两系统间自由切换
评论
共有 条评论