fout = open('school', 'w') # 쓰기 모드로 파일을 오픈 (존재한다면, 덮어씀)#fout = open('school', 'a') # 쓰기 모드로 파일을 오픈 (존재한다면, 맨 뒤에서 부터 추가)fout.write(speech)fout.close() with open('school', 'r') as fin: value = fin.read() print value csv 쓰기import csv with open('sample.csv', 'r') as f: reader = csv.reader(f) reader.next() with open('result2.csv', 'w') as fw: writer = csv.writer(fw) writer.writerow(['city', 'populati..
import sys from PyQt4.QtGui import * from PyQt4.QtCore import * import matplotlib.pyplot as plt from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas import pandas_datareader.data as web class MyWindow(QWidget): def __init__(self): super().__init__() self.setupUI() def setupUI(self): self.setGeometry(600,200, 1200, 600) self.setWindowTitle("PyChart Viewr v0.1") self.se..