zhaoming 发表于 2015-11-30 13:26:57

记录Python处理文件因文件流没有关闭而出现的诡异问题

#!/usr/bin/env python3  # -*-coding: utf-8-*-
  # author: Chris
  # blog: http://www.cnblogs.com/chriscabin/
  # create_time: 2015-09-05 10:25:46
  
  '''
  This is a python script, which aims to create a new python file automaticly.
  '''
  
  __author__ = "Christopher Lee"
  
  import sys
  import time
  from functools import partial
  import os
  
  def create_py_file():
  file_name = 'demo.py'
  
  # 判断参数个数
  args = sys.argv
  
  if len(args) == 2:
  file_name = args
  

  if len(args)
页: [1]
查看完整版本: 记录Python处理文件因文件流没有关闭而出现的诡异问题