function setUrlToParam(param, name) {
var url = window.location.href;
url = url.replace('#', '');
if (url.indexOf('?') > 0) {
window.location.href = url.slice(0, url.indexOf('?')) + '?'+ name + '=' + param;
} else {
window.location.href = url + '?'+ name + '=' + param;
}
}


url parameter 를 줌


커맨드 창을 열어 netstat -nao | findstr [열린포트] 

확인 후 리소스 모니터 를 열어 해당 포트를 쓰고있는 프로세스를 강제 종료 처리한다.


import codecs
def print_results(results):
if FILE_EXPORT :
f = codecs.open("FILE_EXPORT.txt", 'w', 'utf-8')
f.write(u'\ufeff')
for result in results:
print(result)

for k, val in result.items():
f.write(str(val) + '\t')
f.write('\n')
f.close()

print_results(RESULTS)

import codecs 를 하면 된다.

기본적으로 python3 그러니깐 기본적으로 utf-8 이 되어있는 상태에서는 

codecs.BOM_UTF8 이 있긴한데 잘 안듣는다.  (os따라 다르다)

\ufeff'를 파일서두에 넣으면 된다.  

'python' 카테고리의 다른 글

python moviepy mp4를 gif 로 변경하기  (0) 2019.05.16
파이썬 GC  (0) 2018.02.22
python package update all  (0) 2017.02.26
python day 로 for each while  (0) 2017.02.25

+ Recent posts