Python 检测本地文件是否在下载 否就重新拉取
# coding:utf-8import osfrom os.path import join,getsizeimport requestsimport threadingimport datetime#触发器10s 选择 crontab 5分钟跑一次所以取消了#def comparefilesize():# print("hello world")# global t #Notice: use global variable!# t = t...
LINUX下 Python获取xlsx格式的文件内容转到txt 小文本
一些小文本 。。文件处理啥的。。嗯Windows·下和LINUX码的不一致 这点需要注意记得安装xlrd模块 pip install xlrd 转完之后 我是用shell提取插入到数据库 囧还不怎么会用Python提取数据。。。。 晚上回去写注释#-*- coding: utf-8 -*-import xlrdimport sysimport reimport codecsdata = xlrd.open_work...
学习 python 之路
abs(-1) --绝对值 1>>> print 'with %s say %s' % (a,(b+' ')*3)with king say hi hi hi vim test.pyx=raw_input('Enter x: ')if x>0: print '"x" must be 0!' 输入x的值来返回结果其中if语句是不需要() 的 &...
python 遍历oss 实现批量下载
oss存储有很多批量上传的文 = = 然后现在是由于程序主动删除了oss的文件,阿里是不给恢复的,所以想要把文件备份到本地 。 阿里的oss是key-values形式的存储,没有文件夹的概念,也是就是说test/007.jpg实际上是两个文件 一个叫做test/的空文件和一个叫做test/007.j...