record some scripts & python learning
windows可以在pycharm里写
linux
touch 一个py文件
如果是windows写好测试了的,放linux,
要
vim xx.py
然后
:set ff=unix
因为windows的分隔符和unix不同
linux脚本开头要
#!/usr/bin/env python
#coding=UTF-8
可以使用中文了~
加可执行权限: chmod +x somefile.py
执行: python somefile.py