목록Python (53)
준호씨의 블로그
python 에서 메일을 보낼 때 보통 smtp 로 보내겠지만 간혹 lmtp 로 보내야 될 경우가 있다. smtp 와 lmtp 는 대게 비슷한 커맨드로 이루어져 있는데 HELO 가 좀 다르다. smtp 에서는 helo 나 ehlo 를 사용 하지만 lmtp 에서 lhlo 로 바뀐게 변화 중 하나이다. 아무튼 python 의 대표적인 smtp 라이브러리인 smtplib 에 LMTP 가 있으니 그걸 사용하면 손 쉽게 lmtp 발송도 할 수 있다. example 참고 https://tools.ietf.org/html/rfc2033https://docs.python.org/2/library/smtplib.html
기본적인 방법은 len 함수를 이용하는 방법이다. >>> list = [1,2,3,4,5] >>> len(list) 5 array 객체의 len 함수를 이용하는 방법도 있으나 일반적이지는 않다. >>> list.__len__() 5 개인적인 취향으로는 list.length() 같은 방식을 좋아 하지만 python 은 그러한 방식을 선호하지는 않는 것 같다. 참고 http://effbot.org/pyfaq/why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list.htm https://docs.python.org/3/reference/datamodel.html#basic-custom..
There is a number. >>> num = 2.3 What if you want to use with string? (String-Number concatenation) You should convert number to string. There are several ways. str function >>> str(num) '2.3' repr function >>> repr(num) '2.3' Backquote >>> `num` '2.3' but, not in python3 >>> `num` File "", line 1 `num` ^ SyntaxError: invalid syntax format >>> "%f" % (num) '2.300000' pyformat >>> '{}'.format(num..
회사님의 은총으로 IntelliJ 는 이미 라이센스 받아서 사용 하고 있었음. PyCharm 은 커뮤니티 버전으로 사용 하고 있었다. 이미 업무에서 다양한 언어를 사용하고 있는 상태. 업무에 적극 활용은 하지는 않지만 종종 쓰는 언어들 까지 포함하면 java, perl, python, c, html, css, javascript, nodejs, php, ruby, c#, swift... 등등. DB 도 mysql, oracle 은 물론 postgresql, mongodb 등등 최근 IntelliJ 라이센스가 만료 되어서 이참에 다른 언어들의 생산성도 향상 시켜 볼 겸 All Products Pack 으로 신청 해서 받았다. 오오 회사느님 감사합니다 ㅠㅠ All Products Pack 라이센스를 가지고 ..