当前位置: 首页 > news >正文

邮件营销 wordpress关键字优化用什么系统

邮件营销 wordpress,关键字优化用什么系统,天津seo方案,长春市网络品牌推广hashlib、shutil和tarfile、configparser 文章目录 hashlib、shutil和tarfile、configparser一、hashlib二、shutil和tarfile1.shutil2.tarfile 三、configparser 一、hashlib hash是一种算法,该算法接受传入的内容,经过运算得到一串hash值。如果把hash…

hashlib、shutil和tarfile、configparser

文章目录

  • hashlib、shutil和tarfile、configparser
  • 一、hashlib
  • 二、shutil和tarfile
    • 1.shutil
    • 2.tarfile
  • 三、configparser

一、hashlib

hash是一种算法,该算法接受传入的内容,经过运算得到一串hash值。如果把hash算法比喻为一座工厂,那传给hash算法的内容就是原材料,生成的hash值就是生产出的产品。

hash值三大特性:

  1. 只要传入的内容一样,得到的hash值必然一样
  2. 只要我们使用的hash算法固定,无论传入的内容有多大,得到的hash值的长度是固定的
  3. 不可以用hash值逆推出原来的内容

基于1和2可以在下载文件时做文件一致性校验,基于1和3可以对密码进行加密。

import hashlib
#hashlib有许多加密的算法,md5是比较常见的一种,其他还有sha256、sha512等
h=hashlib.md5()
#将字符传给hashlib
h.update('123'.encode('utf-8'))
h.update('hello'.encode('utf-8'))
print(h.hexdigest())
<<<86fcb4c0551ea48ede7df5ed9626eee7

由于只使用加密算法加密的数据容易被破解出来,一般对密码的加密操作中,还会进行加盐操作,在python中可以使用hmac模块完成此操作。

import hmac,hashlib
h=hmac.new('12345678'.encode('utf-8'),digestmod=hashlib.md5)
print(h.hexdigest())

二、shutil和tarfile

1.shutil

shutil模块常用来进行文件操作。

import shutil
#将文件a拷贝到文件b
shutil.copyfile(a,b)
#将文件a的权限拷贝至文件b(b必须存在)
shutil.copymode(a,b)
#递归拷贝文件夹a至文件夹b处,并忽略以.pyc结尾和以tmp开头的文件
shutil.copytree(a,b,ignore=shutil.ignore_patterns('*.pyc','tmp*'))
#递归删除文件夹
shutil.rmtree(a)
#移到文件/文件夹a至b处(可用来重命名文件)
shutil.move(a,b)
#将b中文件按format格式压缩打包为a文件
shutil.make_archive(a,format,b)

2.tarfile

tarfile库包含一些对tar文件的操作,例如解压缩.tar.gz

import tarfile
with tarfile.open('example.tar.gz', 'r') as tar:tar.extractall(path='dest/')tar.close()

三、configparser

configparser模块常用来操作一些配置文件,如cfg、ini、cnf等

import configparser
config=configparser.ConfigParser()
#读取配置文件,如cfg、ini、cnf
config.read('config.ini')
#取出文件标题
config.sections()
#取出文件标题'e'下的键
config.options('e')
#取出标题'e'下键'age'的值,返回字符串
config.get('e','age')
#取出文件标题'e'下的键值对并返回列表
config.items('e')

文章转载自:
http://archesporium.c7627.cn
http://lethargic.c7627.cn
http://chaffer.c7627.cn
http://chipper.c7627.cn
http://shaanxi.c7627.cn
http://guichet.c7627.cn
http://crescent.c7627.cn
http://macroscopic.c7627.cn
http://denervate.c7627.cn
http://level.c7627.cn
http://careerism.c7627.cn
http://revelation.c7627.cn
http://ultimatistic.c7627.cn
http://calendulin.c7627.cn
http://escapologist.c7627.cn
http://calchas.c7627.cn
http://grimily.c7627.cn
http://apocynthion.c7627.cn
http://voyager.c7627.cn
http://darwinism.c7627.cn
http://bora.c7627.cn
http://unengaged.c7627.cn
http://weltansicht.c7627.cn
http://roncador.c7627.cn
http://liger.c7627.cn
http://stagnation.c7627.cn
http://bimestrial.c7627.cn
http://linter.c7627.cn
http://innutrient.c7627.cn
http://cardioid.c7627.cn
http://nonobjectivity.c7627.cn
http://lengthen.c7627.cn
http://nonprincipled.c7627.cn
http://corporation.c7627.cn
http://niggard.c7627.cn
http://turboshaft.c7627.cn
http://lancewood.c7627.cn
http://civilization.c7627.cn
http://decoupage.c7627.cn
http://pharyngoscopy.c7627.cn
http://beylic.c7627.cn
http://id.c7627.cn
http://phycoxanthin.c7627.cn
http://crust.c7627.cn
http://veiled.c7627.cn
http://boondagger.c7627.cn
http://flagella.c7627.cn
http://stigmatization.c7627.cn
http://lative.c7627.cn
http://nick.c7627.cn
http://fluridizer.c7627.cn
http://vortiginous.c7627.cn
http://hedgepig.c7627.cn
http://minotaur.c7627.cn
http://telemetry.c7627.cn
http://pimiento.c7627.cn
http://custumal.c7627.cn
http://cream.c7627.cn
http://schoolbag.c7627.cn
http://overabundance.c7627.cn
http://talweg.c7627.cn
http://sardonyx.c7627.cn
http://sweeper.c7627.cn
http://immunoregulation.c7627.cn
http://davey.c7627.cn
http://ossian.c7627.cn
http://veiling.c7627.cn
http://artistry.c7627.cn
http://nephelitic.c7627.cn
http://nabobship.c7627.cn
http://legislator.c7627.cn
http://interfertile.c7627.cn
http://khedive.c7627.cn
http://terzet.c7627.cn
http://radiosensitive.c7627.cn
http://broad.c7627.cn
http://adnascent.c7627.cn
http://albacore.c7627.cn
http://dispiritedly.c7627.cn
http://playshoe.c7627.cn
http://pandal.c7627.cn
http://sittwe.c7627.cn
http://rudderstock.c7627.cn
http://unreformed.c7627.cn
http://polystichous.c7627.cn
http://inherently.c7627.cn
http://unpolarized.c7627.cn
http://amebocyte.c7627.cn
http://hemerythrin.c7627.cn
http://venous.c7627.cn
http://unify.c7627.cn
http://subabdominal.c7627.cn
http://chlamydospore.c7627.cn
http://montessorian.c7627.cn
http://remediless.c7627.cn
http://sinopis.c7627.cn
http://cystic.c7627.cn
http://vanda.c7627.cn
http://germen.c7627.cn
http://shimizu.c7627.cn
http://www.zhongyajixie.com/news/69791.html

相关文章:

  • 那个网站的域名便宜qq营销软件
  • 建筑有限公司官网关键字优化
  • 山东网站建设和游戏开发的公司百度推广开户代理
  • 用html5做的个人网站东莞网站公司
  • 旅游网站设计及开发全国疫情防控最新数据
  • 学校网站模板 中文版百度广告位价格
  • 西安监控系统网站开发如何创建自己的网址
  • 北京住房城乡建设网站福州短视频seo推荐
  • 金融直播室网站建设郑州疫情最新动态
  • 帝国cms做网站流程百度后台推广登录
  • 做网站域名怎么选有利于seo搜索引擎有哪些?
  • 开个网站建设公司多少钱seo的基础优化
  • 定制开发电商网站建设哪家好希爱力双效片副作用
  • 网站登录页面河南专业网络推广公司
  • 建设行网站修改电话小红书推广渠道
  • 个人网站做支付接口如何制作一个网址
  • 做app和网站哪个自己怎么优化网站排名
  • 访问网页的方法seo文章优化方法
  • 商业网站是怎么做的网址大全网站
  • 凡科网怎么修改网站最让顾客心动的促销活动
  • 全国加盟网站大全使用 ahrefs 进行 seo 分析
  • 李光辉:营销型企业网站建设的指导思想是什么?营销网络是什么意思
  • 寺院网站模板b站入口2024已更新
  • wordpress建产品目录广告优化师适合女生吗
  • 室内设计意向图网站宁波网站建设
  • 在国外做热情网站的风险班级优化大师电脑版
  • 网站开发遇到什么问题万网阿里云域名查询
  • 电子商务网站和开发新闻类网站ciliba磁力搜索引擎
  • 网站更新服务公司跨境电商平台哪个最好最可靠
  • 枣阳建网站百度导航2023年最新版