首页
学习
活动
专区
工具
TVP
发布

python3

专栏作者
11919
文章
14132196
阅读量
238
订阅数
python中time.time()和
time.time()返回的是一个浮点数,以秒为单位,time.strftime后可以自定义格式,如time.strftime('%Y-%m-%d %H:%M:%S')
py3study
2020-01-12
1.2K0
python socket 进行文件上
#coding:utf-8 import SocketServer import os import datetime import MySQLdb class mysql: def init(self): self.connect = MySQLdb.connect( host = '192.168.221.203', user = 'hall', passwd = '520157', port = 3306, db = 'info', charset = 'utf8' ) def mysql_create_table_info(self): cursor = self.connect.cursor() sql = """create table if not exists info( action char(20), actin_time varchar(40), file_size varchar(20), file_name varchar(40), operation_user char(20) )""" cursor.execute(sql) cursor.close() self.connect.commit() self.connect.close() def mysql_create_table_user(self): cursor = self.connect.cursor() sql_user = """create table if not exists user( user varchar(20), passwd varchar(40) )""" cursor.execute(sql_user) data = """insert into user values( "hall", "hall"), ("hexulin", "hexulin")""" cursor.execute(data) cursor.close() self.connect.commit() self.connect.close()
py3study
2020-01-10
4110
python之day3(文件操作、字符转
f=open(“yesterday”,”r”,encoding=”utf-8”)  #以只读模式打开文件
py3study
2020-01-10
5900
C#学习笔记(3)——枚举
       枚举类型不仅可以提高程序的可读性,而且可以减少因底层值发生改变而导致的程序改动。另外一个好处是枚举类型是强类型,以enum类型作为参数传递时,接受方法必须有一个相同的匹配参数;否则编译器将会报错。
py3study
2020-01-08
4870
python httpConnectio
httplib实现了http和https的客户端协议,但是在python中,模块urllib和urllib2对httplib进行了更上层的封装。
py3study
2020-01-08
4500
【Go语言】【3】GO语言常量
  通常情况下语言入门前会讲一堆背景和特性,目的是为了能让学习者对该语言有一个大概的认识,但这里我想直接进入细节,不是因为任性,而是因为常量是编程语言最基本的组成元素,这与语言背景无关。
py3study
2020-01-07
1.9K0
没有更多了
社区活动
RAG七天入门训练营
鹅厂大牛手把手带你上手实战
Python精品学习库
代码在线跑,知识轻松学
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档