본문 바로가기

python

환경변수 등록 (Python) - 환경변수 등록하기 -OS : Windows 8.1 K 1. 사용자 계정 -> 환경 변수 변경 - 시스템 변수 버튼들이 활성화 되지 않는다. 2. 시스템 -> 설정 변경 -> 시스템 속성의 고급 탭 -> 환경 변수 - 시스템 변수 버튼 활성화 됨 - 확인 더보기
python get(), strip(), lstrip(), rstrip() get(key[, default])¶Return the value for key if key is in the dictionary, else default. If default is not given, it defaults to None, so that this method never raises a KeyError. 출처 : https://docs.python.org/3/library/stdtypes.html str.strip([chars])¶Return a copy of the string with the leading and trailing characters removed. The chars argument is a string specifying the set of characters to be.. 더보기
Windows 8 (64bit) Python 2.6 easy_install, pip, numpy 다운로드 및 설치 Windows 8 (64bit) Python 2.6 easy_install, pip, numpy 다운로드 및 설치 1. easy_install 다운로드 https://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz2. 설치python distribute_setup.py3. 환경변수 등록- 시스템 변수 Path 등록- 설치경로\Scripts4. pip 설치easy_install pip5. numpy 다운로드http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy6. numpy 설치pip install numpy-1.9.2+mkl-cp26-none-win_amd64.whl 더보기
msgpack & cPickle & Garbage Collector 속도 테스트 FileDB Test를 위해 Sample 파일을 만들어 본다. 1. msgpack과 cPickle Sample 파일 생성 #!/usr/bin/python #-- import -- import time, datetime import io import msgpack import random #import cPickle #데이터 타입별로 생성한다. type0 = "Hello World!!" type1 = [1,2,3,4,5,6,7,8,9,10] type2 = ['aa','bb','cc','dd','ee','ff','gg','hh','ii'] type3 = {'test1':'test1_value','test2':'test2_value','test3':'test3_value'} type4 = ('abcd',123.. 더보기