#!/usr/bin/python import os try: filename = "c:\windows-ve1rsion.txt" with open(filename) as fn: b = os.path.getsize(filename) if b > 0: print ('size %d kb' % b) content = fn.readlines() print(content) else: print "file is empty"except IOError as e: print(e)
Brak komentarzy:
Prześlij komentarz