腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
返回腾讯云官网
代码伴一生
专栏成员
举报
74
文章
74945
阅读量
12
订阅数
订阅专栏
申请加入专栏
全部文章(74)
python(38)
java(9)
json(3)
编程算法(3)
windows(3)
验证码(3)
c#(2)
node.js(2)
html(2)
数据库(2)
oracle(2)
ide(2)
apache(2)
腾讯云测试服务(2)
http(2)
缓存(2)
爬虫(2)
网络安全(2)
url(2)
多线程(2)
脚本(2)
框架(2)
连接(2)
算法(2)
字符串(2)
javascript(1)
lua(1)
xml(1)
jquery(1)
云数据库 SQL Server(1)
云数据库 Redis(1)
api(1)
jar(1)
tomcat(1)
linux(1)
windows server(1)
spring(1)
文件存储(1)
访问管理(1)
容器(1)
存储(1)
游戏(1)
分布式(1)
ssh(1)
gui(1)
ftp(1)
tcp/ip(1)
socket编程(1)
utf8(1)
性能测试(1)
beautifulsoup(1)
cmd(1)
dll(1)
email(1)
event(1)
exif(1)
get(1)
import(1)
io(1)
itext(1)
list(1)
lock(1)
md5(1)
pdf(1)
queue(1)
redis(1)
soap(1)
tar(1)
tkinter(1)
txt(1)
web(1)
word(1)
wxpython(1)
编码(1)
表单(1)
插件(1)
程序(1)
队列(1)
对象(1)
二进制(1)
服务器(1)
管理(1)
加密(1)
客户端(1)
乱码(1)
排序算法(1)
软件(1)
数据(1)
数组(1)
压缩(1)
搜索文章
搜索
搜索
关闭
python通过代理服务器访问ftp服务
ftp
html
网络安全
proxy_info = { 'host' : 'proxy.myisp.com', 'port' : 3128, } proxy_support = urllib2.ProxyHandler({"ftp" : % proxy_info}) opener = urllib2.build_opener(proxy_support) urllib2.install_opener(opener)
代码伴一生
2021-11-03
1.8K
0
python通过httplib发送GET和POST请求代码
python
http
python有一个httplib的库,提供了很方便的方法实现GET和POST请求,只需要简单的组织一下即可。
代码伴一生
2021-11-03
982
0
python生成随机密码或随机字符串
python
字符串
python生成随机密码或随机字符串 import string,random def makePassword(minlength=5,maxlength=25): length=random.randint(minlength,maxlength) letters=string.ascii_letters+string.digits # alphanumeric, upper and lowercase return ''.join([random.choice(letters)
代码伴一生
2021-11-03
1.4K
0
python模拟Get请求保存网易歌曲的url
python
get
url
#coding:utf-8 import requests import json url = 'http://music.163.com//api/dj/program/byradio?
代码伴一生
2021-11-03
1.2K
0
python中字典dict的常用操作方法
python
下面的python代码展示python中字典的常用操作,字典在python开发中有着举足轻重的地位,掌握字典操作相当重要
代码伴一生
2021-11-03
568
0
Python 发送带附件的email
python
email
from email.MIMEText import MIMEText from email.MIMEMultipart import MIMEMultipart import smtplib mail_host = 'smtp.126.com' mail_user = 'xx@126.com' mail_pwd = 'xx' mail_to = 'xxzhao@gmail.com' msg = MIMEMultipart() att = MIMEText(open('d:\a.txt','rb').rea
代码伴一生
2021-11-03
832
0
Python实现图标锁定到Windows任务栏或删除图标
windows
此处使用到了Windows接口,Python中调用windows接口,可以使用win32com
代码伴一生
2021-11-03
664
0
python用来获得图片exif信息的库代码
python
exif
下面的代码演示的是调用方法。 # library test/debug function (dump given files) if name == 'main': import sys import getopt # parse command line options/arguments try: opts, args = getopt.getopt(sys.argv[1:], "hqsdt:v", ["help", "quick", "strict", "debug", "s
代码伴一生
2021-11-03
598
0
python通过pil生成图片验证码
python
验证码
# -- coding: utf-8 -- 导入三个模块 import Image,ImageDraw,ImageFont import random import math '''基本功能''' 图片宽度 width = 100 图片高度 height = 40 背景颜色 bgcolor = (255,255,255) 生成背景图片 image = Image.new('RGB',(width,height),bgcolor) 加载字体 font = ImageFont.truetype('FreeSan
代码伴一生
2021-11-03
511
0
python开发的简单窗口界面的倒计时界面
windows
tkinter
下面的代码通过Tkinter制作windows窗口界面,然后时间了一个简单的倒计时功能,代码可以直接运行
代码伴一生
2021-11-03
884
0
Python文件、目录的一些操作(新增、移动、删除)
python
创建文件: os.mknod("test.txt") #创建孔文件 open("test.txt",w) #直接打开一个文件,如果文件不存在则创建文件 创建目录: os.mkdir("file") 复制文件 shutil.copyfile("oldfile","newfile") #oldfile 和 newfile 都只能是文件 shutil.copy("oldfile","newfile") #oldfile 只能是文件夹,newfile 可以使文件,也可以是目录 复制文件夹 shutil.co
代码伴一生
2021-11-02
833
0
Python实现文件的压缩及解压
文件存储
当我们遇到大量小文件的传输时,一般会涉及到文件的压缩和解压,下面对zip的压缩解压直接上代码
代码伴一生
2021-11-02
671
0
C# 计算输入汉字的GBK编码,十六进制数输出
c#
编码
C# 计算输入汉字的GBK编码,十六进制数输出 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace getCode { class Program { /// <summary> /
代码伴一生
2021-11-02
969
0
验证码C#实现代码
c#
验证码
using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Drawing; //powered by http://outofmemory.cn/ name
代码伴一生
2021-11-02
559
0
python压缩和读取.tar.bz2格式的压缩包
python
tar
压缩
python可以通过tarfile模块压缩和解压.tar.bz2包 #压缩文件夹为 .tar.bz2 import tarfile import bz2 archive = tarfile.open('myarchive.tar.bz2','w:bz2') archive.debug = 1 # Display the files beeing compressed. archive.add(r'd:\myfiles') # d:\myfiles contains the files
代码伴一生
2021-11-02
514
0
python实现简单的soap客户端
python
soap
客户端
# $Id: testquote.py 2924 2006-11-19 22:24:22Z fredrik $ delayed stock quote demo (www.xmethods.com) from elementsoap.ElementSOAP import * class QuoteService(SoapService): url = "http://66.28.98.121:9090/soap" # Put webservice URL here. def g
代码伴一生
2021-11-02
674
0
tornado实现文件下载的代码
json
获取请求参数;请求参数生成json格式,存入文件;下载json文件 class SpockDataIntegrationDownloadHandler(tornado.web.RequestHandler): def post(self): selectname = self.get_argument('selectname') json_string = {} """ 将请求参数放到dict中 """ type = self.g
代码伴一生
2021-11-02
815
0
python获取Windows特殊文件夹路径代码
python
有时候你想给你的程序添加桌面快捷方式,但却连桌面的准确路径都不知道,还好微软的API给出了一些特殊文件夹路径的获取方法,再利用python的win32com模块(非标准库)即可在python中实现同样的操作!
代码伴一生
2021-11-02
1.1K
0
Python模拟键盘输入和鼠标操作
dll
event
import
lock
一、Python键盘输入模拟: import win32api import win32con win32api.keybd_event(17,0,0,0) #ctrl键位码是17 win32api.keybd_event(86,0,0,0) #v键位码是86 win32api.keybd_event(86,0,win32con.KEYEVENTF_KEYUP,0) #释放按键 win32api.keybd_event(17,0,win32con.KEYEVENTF_KEYUP,0) 附个键位码表:
代码伴一生
2021-11-02
1.5K
0
Python分段下载文件
python
软件
下载较大文件时分段下载会加速下载过程,几乎所有下载软件都有类似的特性。在python中如何实现分段下载文件呢?
代码伴一生
2021-11-02
670
0
点击加载更多
社区活动
AI代码助手快速上手训练营
鹅厂大牛带你玩转AI智能结对编程
立即学习
Python精品学习库
代码在线跑,知识轻松学
立即查看
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
立即体验
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
立即查看
领券
问题归档
专栏文章
快讯文章归档
关键词归档
开发者手册归档
开发者手册 Section 归档