본문 바로가기

Python

Mavericks cache all plist files, be aware Nowadays, I have been modifying my iTerm2 profiles by using python script. So after modifying it, I have to convert the file back to in binary1 format as usual. But after upgrade my OSX to Mavericks, I found all Preferences are cached. So the previous procedure didn't work at all unless I reboot or re-login. 10.9 Preferences are cached.http://hints.macworld.com/article.php?story=2013090804282863.. 더보기
merge sort in Python - Python 으로 merge sort 구현하기 Python 을 복습할 겸, 학부시절 재미있게 공부했던 merge sort 를 구현해보았다. wikipedia 에 Pseudo code 가 있어서 쉽게 구현할 수 있었다. 다시한번 Python 언어가 얼마나 프로그램 알고리즘을 검증하는데 편한 언어인지 다시 한 번 알게 된 시간 이었다. 작성된 코드가 Pseudo code 와 거의 똑같다. 정말 최고다! '''Created on 2013. 3. 21. @author: starblood''' def merge(left, right): result = [] while len(left) > 0 or len(right) > 0: if len(left) > 0 and len(right) > 0: if left[0] 0: result.append(left[0]) l.. 더보기
Eclipse IDE 에 Python 플러그인 설치하기 Eclipse IDE 에서 python 프로그래밍을 할 수 있다. 간단하게 Market Place 에서 python 을 찾아서 설치하면 된다. 1. Eclipse 에서 Help -> Eclipse Marketplace 를 찾아서 클릭 2. PyDev 플러그인을 찾는다. 3. PyDev 설치에 필요한 파일을 설정 4. License 에 동의하고 설치 시작 더보기
Python TCP/IP 관련 에러메시지 대응 일단 오류가 어떤 형식으로 나오는 지 살펴 보겠습니다. Exception happened during processing of request from ('xxx.xxx.xxx.xxx', 43933)Traceback (most recent call last): File "C:\Python25\lib\SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "C:\Python25\lib\SocketServer.py", line 241, in process_request self.finish_request(request, client_address) File "C:\Python25\lib\Soc.. 더보기