随笔分类 -  python

摘要:#!/usr/bin/python #coding=utf-8 message="python" print(message) print("\tpython") print("hello\npython\nhello\nworld") 阅读全文
posted @ 2020-12-26 22:09 tigergaonotes 阅读(98) 评论(0) 推荐(0)
摘要:#!/usr/bin/python #coding=utf-8 first_name='tiger' last_name='gao' full_name= f"{first_name} {last_name}"--f为format的缩写 print(full_name) print(full_nam 阅读全文
posted @ 2020-12-26 21:59 tigergaonotes 阅读(54) 评论(0) 推荐(0)
摘要:{ "cmd": ["python3", "-u", "$file"] } 阅读全文
posted @ 2020-12-25 22:21 tigergaonotes 阅读(76) 评论(0) 推荐(0)
摘要:#!/usr/bin/python #coding = utf-8 import os files = os.listdir('/opt') for file in files: print file 阅读全文
posted @ 2020-12-24 22:09 tigergaonotes 阅读(68) 评论(0) 推荐(0)
摘要:python2.6版本有很多局限性:最重要的就是,当前最新的pip版本已经不再支持python2.6;这给我们安装很多python库增加了很多不便;所以这里把我升级python2.6--2.7的过程及遇到的坑 记录一下: 实验系统版本centos6+ ;centos7+版本自带的python版本就是 阅读全文
posted @ 2020-12-22 22:02 tigergaonotes 阅读(202) 评论(0) 推荐(0)
摘要:#!/usr/bin/python #coding=utf-8 #@rename file #@2019/11/27 import os ls = os.rename('/root/tigergao.py','/root/test.py') print("重命名成功") files = os.lis 阅读全文
posted @ 2020-12-20 21:02 tigergaonotes 阅读(65) 评论(0) 推荐(0)