개발자 레니는 지금 -/소프트웨어와 함께 (59) 썸네일형 리스트형 [ Python ] Threading GIL 정의 Python부제목 시작 전 테스트환경 살피기 Time 2017년 08월 24일 OS Virtual Box - Linux(Ubuntu 16.04 LTS) Language Python 2.7 GIL ( Global Interpreter Lock ) 의 약자로 하나의 파이썬 인터프리터에서는 하나의 작업만 실행이 가능한 것이다. 하나의 인터프리터가 실행이 될 때, global 변수로 제어를 하기때문에, 여러 Thread가 동시에 수행할 경우 데이터가 엉망이 되기 때문에 한번에 하나의 Thread만이 인터프리너 내부 global 변수에 접근가능하도록 해 놓은 것이다. 따라서 Multi Thread를 사용할 경우 다른 Thread로 들어가기 전에 Lock을 걸어놓고 움직이기 때문에 결국 한번에 하나의 Thread가.. [ Python ] Python Documents Python Documents 두 페이지 모두 영어로 되어 있는 페이지입니다.Chrome을 사용하시면 영문페이지 한글번역이 가능합니다. 참조내용 1. Python Tips2. Python 2.7.13 documentation [ Python ] map() 함수 Pythonmap() 함수 시작 전 테스트환경 살피기 Time 2017년 08월 18일 OS Linux(Ubuntu 16.04 LTS) Language Python 2.7 map(function_to_apply, list_of_inputs) Apply function to every item of iterable and return a list of the results. If additional iterable arguments are passed, function must take that many arguments and is applied to the items from all iterables in parallel. If one iterable is shorter than another it i.. [ Python ] range()와 xrange()의 차이 Python range()와 xrange()의 차이 시작 전 테스트환경 살피기 Time 2017년 08월 18일 OS Linux(Ubuntu 16.04 LTS) Language Python 2.7 range(start, stop[, step]) This is a versatile function to create lists containing arithmetic progressions. It is most often used in for loops. The arguments must be plain integers. If the step argument is omitted, it defaults to 1. If the start argument is omitted, it defaults to 0. The.. [ Python ] Pickle! binary를 file에 자료형 그대로 저장하기! PythonPickle! binary를 file에 자료형 그대로 저장하기! 시작 전 테스트환경 살피기 Time 2017년 08월 18일 OS Linux(Ubuntu 16.04 LTS) Language Python 2.7 일반 텍스트를 파일로 저장할 때는 파일 입출력을 이용하면 되지만, list 나 class같은 자료형을 일반 입출력을 이용하여 저장하거나 불러올 수 없다. >>> testList=[1, 2, 3, 4]>>> with open("test.txt", "wb") as f: f.write(testList)... Traceback (most recent call last): File "", line 1, in TypeError: argument 1 must be string or buffer, no.. [ Python ] 시스템 명령어 실행하기 PythonPython code로 시스템 명령어 실행하기 시작 전 테스트환경 살피기 Time 2017년 08월 18일 OS Linux(Ubuntu 16.04 LTS) Language Python 2.7 import osos.system( 시스템 명령어와 인자값 ) os.system("ls -al") 👻[ Python ] File 혹은 Dir 삭제하기 내용 이전 하였습니다!다음 링크에서 내용 확인 부탁드립니다! 👇 👇 👇 👇 https://proni.tistory.com/entry/%F0%9F%90%8D-Python-code%EB%A1%9C-Ubuntu-file-directory-%EC%82%AD%EC%A0%9C%ED%95%98%EA%B8%B0 [ Python ] TypeError: unsupported operand type(s) for +: 'int' and 'str' ... Python errorTypeError: unsupported operand type(s) for +: 'int' and 'str' ... 시작 전 테스트환경 살피기 Time 2017년 08월 18일 OS Linux(Ubuntu 16.04 LTS) Language Python 2.7 일단 문제의 원인은 보통 문장을 연결해 줄 때 발생한다.문자열 + 정수형 문자를 연산하면 문자열로 만들어 줬던 다른 언어체계와 헷갈리기 시작하는게 주 원인같다. 예를 들어 아래와 같은 문장 사용시에 Python은 error를 뱉는다. >>> print "hi" + 2017 + "nice to meet you" + 1004Traceback (most recent call last): File "", line 1, in Type.. 이전 1 ··· 3 4 5 6 7 8 다음