[Python 파이션 관련정보]4 파일 확장자 변환 프로그램 import os, sys, glob if os.path.isdir ('txt_files'): os.system('\\rm -rf txt_files') os.system('mkdir txt_files') flist=glob.glob('*') for f1 in flist: if f1[-2:] == ".v": os.system('cp %s ./txt_files/%s'%(f1, f1[:-2]+".txt")) 2021. 3. 27. CRC16 python code crc16 에 대해 공부를 하면서, c 코드를 python code 로 변환해 본 것이다. G(X) = X^16 + X^15 + X^2 + X^0 아래는 테스트 입력이다. 위 네개의 값에 대한 crc 코드 값은 '0dc3' 이 나온다. 2021. 1. 31. qt4 사용법 qt_designer 로 form 을 먼저 만든다. ex.ui 생성 pyuic4.bat 명령어를 사용하여 ex.ui 파일을 ex_ui.py 파일로 변환한다. (명령) C:\Python27\Lib\site-packages\PyQt4\pyuic4.bat (인자) -x %NAME% -o %NAMEONLY%_ui.py qt_designer 로 만든 form 을 사용하려면 ex_ui.py 파일을 임포트 해야 한다. import sys from PyQt4 import QtGui, QtCore from simple_ui import * class MyForm(QtGui.QMainWindow): def init(self, parent=None): QtGui.QWidget.init(self, parent) self.ui.. 2020. 10. 8. python3 에 beautifulsoup 설치하기 회사에서는 pip 에러가 난다. (linux) alias pip='pip --trusted-host pypi.org --trusted-host files.pythonhosted.org' (windows) C:>pip --trusted-host pypi.org --trusted-host files.pythonhosted.org install --upgrade --user pip C:\Users\win>pip3 install --upgrade --user pip C:>pip --trusted-host pypi.org --trusted-host files.pythonhosted.org install --user requests C:>pip --trusted-host pypi.org --trusted-host .. 2020. 10. 7. 이전 1 다음