随笔分类 - Python
摘要://后台常在 退出终端仍然运行 nohup python pyredis.py & nohup输出重定向到my.log nohup command > my.log 2>&1 &
阅读全文
摘要:方法一:shell_exex() $output = shell_exec('python ./python/pdfBook.py');
阅读全文
摘要:编码问题1.读取文件乱码原因:python2.7默认使用unicode编码读取文件方法:在文件头部设置编码#coding=utf-82.写入文件乱码原因:python2.7默认使用unicode编码方法:设置默认输出编码为utf-8即可import sysreload(sys)sys.setdefa
阅读全文
摘要:1.创建文件xx.py#!/usr/bin/python3print("Hello, World!");2.Linux下执行$ python hello.py3.编码 默认字符串unicode设置编码#coding=utf-8 4.标识符 第一个字符必须是字母表中字母或下划线'_'。 标识符的其他的
阅读全文

浙公网安备 33010602011771号