목록Python3 (2)
아미(아름다운미소)
Python3 urllib으로 http로 POST 전송 ''' Created on 2019. 12. 21. @author: test ''' import urllib.parse import urllib.request details = urllib.parse.urlencode({'CODE': '코드', 'NAME': '이름', 'KIND': '종류', 'PRICE': '가격', 'USERID': '아이디'}) details = details.encode('UTF-8') url = urllib.request.Request('https://test.cafe24.com/postdata_test.php', details) url.add_header("User-Agent","Mozilla/5.0 (Windows; U..
다음은 Python 3 스크립트에서 특정 출력에 색상을 지정하는 데 사용하는 클래스입니다 EX) from colorprint import ColorPrint as _ _.print_fail('Error occurred, quitting program') Class)import sys # Colored printing functions for strings that use universal ANSI escape sequences. # fail: bold red, pass: bold green, warn: bold yellow, # info: bold blue, bold: bold white class ColorPrint: @staticmethod def print_fail(message, end = '\n..