pyautogui는 외장모듈이다. 모듈명 그대로 다운로드 가능하다.

pip3 install pyautogui

역할은 마우스, 키보드의 입력 / 이동을 Python으로 조절하기 위한 모듈이다. 흔히 마우스 마음대로 움직이거나, 키보드가 맘대로 쳐지면 이와 비슷한 모듈이 들어가 있다고 보면 된다.


주요 함수 설명

  • pyautogui.size() : 현재 모니터의 해상도를 (x,y) tuple로 반환한다.
  • pyautogui.onScreen(x,y) : 좌표 x,y의 위치가 모니터 안에서 유효한 좌표인지 bool값으로 반환한다.
  • pyautogui.position() : 현재 마우스의 위치를 반환한다.
  • pyautogui.moveTo(x,y,duration=num_seconds) : duration에 적힌 기간동안 x,y의 좌표로 마우스를 이동한다.
  • pyautogui.moveRel(xoffset,yoffset,duration=num_seconds) : duration에 적힌 기간동안 xoffset, yoffset 만큼 마우스를 이동한다.
  • pyautogui.dragTo(x,y,duration=num_seconds) : duration에 적힌 기간동안 x,y로 마우스를 드래그(클릭 후 이동)한다.
  • pyautogui.dragRel(xoffset,yoffset,duration_num_seconds) : duration에 적힌 기간동안 xoffset, yoffset 만큼 마우스를 드래그(클릭 후 이동)한다.
  • pyautogui.click(x=moveToX,y=moveToY,clickes=num, interval=secs_betweens_clicks,button="left") : 현재위치에서 클릭한다. parameter로는 옆과 같은것을 줄 수 있다.
  • pyautogui.rightClick(x=moveToX,moveToY) : 우클릭
  • pyautogui.middleClick(x=moveToX,moveToY) : 휠클릭
  • pyautogui.doubleClick(x=moveToX,moveToY) : 더블클릭
  • pyautogui.tripleClick(x=moveToX,moveToY) : 세번클릭
  • pyautogui.scroll(amount_to_scroll,x=moveToX,y=moveToY) : 마우스 스크롤 한다. 양수면 위로, 음수면 아래로
  • pyautogui.mouseDown(x=moveToX, y=moveToY, button='left') : 마우스버튼을 "누른다"
  • pyautogui.mouseUp(x=moveToX, y=moveToY, button='left') : 마우스버튼을 "뗀다"
  • pyautogui.typewrite(type_string, interval=secs_between_keys) : type_string을 친다.
  • pyautogui.hotkey(param1, param2...) : 단축키로 쓰인다. 보통 param에 'ctrl', 'shift'등이 쓰인다.
  • pyautogui.keyDown(key_name) : key_name을 '누른다'
  • pyautogui.keyUp(key_name) : key_name을 '누른다'
  • pyautogui.alert(message) : 경고 메시지 박스
  • pyautogui.confirm(message) : 확인 메시지 박스
  • pyautogui.prompt(message) : user Input 처리를 위한 메시지 박스
  • pyautogui.screenshot(region=(x1,y1,x2,y2)) : 스크린샷을 찍는다. PIL.Image 객체를 반환한다.
  • pyautogui.locateOnScreen(Image_name) : 모니터화면에서 Image_name에 해당하는 Image를 찾아서 위치를 반환한다.(웹 개체는 안된다. 로컬개체만)

이거말고도 pixelMatchsColor등 특정 규칙에 맞게 화면의 마우스를 이동시키는 방법도 있다.

 

출처 : https://pyautogui.readthedocs.io/en/latest/index.html

 

Welcome to PyAutoGUI’s documentation! — PyAutoGUI documentation

Welcome to PyAutoGUI’s documentation! PyAutoGUI lets your Python scripts control the mouse and keyboard to automate interactions with other applications. The API is designed to be as simple. PyAutoGUI works on Windows, macOS, and Linux, and runs on Pytho

pyautogui.readthedocs.io

 

* pyautogui.FAILSAFE라는 모듈 설정이 있다. 기본 규칙은 TRUE로 되어있다. 화면끝에 마우스가 부딫히면 잠깐동안 프로그램을 멈추는 기능이다.

파이선에서 날짜에 대한 연산을 도와주는 calendar라는 모듈이다. 현실세계의 날짜 연산에서 사용될 수 있는 계산 함수들을 제공한다. 하나하나 알아보자


Calendar 객체

모든 날짜 연산은 캘린더 객체에서 이루어 진다. 객체는 다음과 같이 생성한다.

>>> my_cal = calendar.Calendar()
### Calendar(firstweekday=0)로 인자지정이 가능하다. firstweekday는 언제가 그 주의 시작요일인지 정하는 것이다)

Calendar객체가 제공하는 연산은 다음과 같다.

  • iterweekdays() : 0~6까지의 요일 인덱스를 담고 있는 iterator를 반환한다. firstweekday가 지정되어있으면 시작 순서가 바뀐다.
  • itermonthdays(year,month) : year년도의 month동안의 iterator를 반환한다. 그니까 itermonthdays(2020,12)면 2020년 12월의 일을 포함한 iterator를 반환하는 건데, 달력에 표기하기 위한 만큼의 넘어가는주와 넘어오는주를 포함해서 반환한다. 그때 값은 0이다.
  • itermonthdays2(year,month) : itermonthdays와 같은 범위이나, (일, 요일)의 튜플형태의 iterator를 반환한다.
  • itermonthdays3(year,month) : itermonthdays와 같은 범위이나, (년, 월, 일)의 튜플형태의 iterator를 반환한다.
  • itermonthdays4(year,month) : itermonthdays와 같은 범위이나, (년, 월, 일, 요일)의 튜플형태의 iterator를 반환한다.
  • monthdatescalendar(year,month) : itermonthdays와 같은 범위이나, 매일매일에 대한 datetime.date객체를 리스트로 반환한다.
  • monthdays2calendar(year,month) : itermonthdays와 같은 범위이나, 하루하루는 (일, 요일)의 튜플로, 주 단위로 리스트로 반환한다.
  • monthdayscalendar(year,month) : itermonthdays와 같은 범위이나, 주 단위 리스트로 반환한다
  • yeardatescalendar(year,width=3) : 연도에 대한 매일매일을 datetime.date객체로 월 단위 리스트로 반환한다. 이때 한 리스트원소에 얼만큼의 월이 들어갈지가 width이다.
  • yeardays2calendar(year,width=3) : 위와 유사하나 datetime.date객체는 아니고 요일이 포함된 튜플을 반환한다.
  • yeardayscalendar(year.width=3) : 위와 유사하나 datetime.date객체는 아니고 날짜만 해당하는 리스트를 반환한다.

 

 

TextCalendar 객체

Calendar는 숫자와 객체로 이루어져 있어 가시성이 떨어진다. 조금 보기 쉬운 표현을 위해서 TextCalendar라는 객체가 존재한다.

>>> my_cal = calendar.TextCalendar()
### TextCalendar(firstweekday=0)로 인자지정가능하다. firstweekday는 어디가 요일의 시작일지 이다.

TextCalendar 객체가 제공하는 연산은 다음과 같다.

  • formatmonth(theyear,themonth,w=0,l=0) : 해당 월의 달력을 출력한다. w, l로 달력 크기 지정을 한다.
  • prmonth(theyear,themonth,w=0,l=0) : formatmonth의 결과를 인쇄한다.
  • formatyear(theyear,w=2,l=1,c=6,m=3) : 해당 년도의 달력을 출력한다. w,l로 달력의 크기를, c로 월 사이사이의 공간의 크기를, m으로 몇 열로 출력할지를 정한다.
  • pryear(theyear,w=2,l=1,c=6,m=3) : formatyear의 결과를 인쇄한다.

 

 

HTMLCalendar 객체

HTMLCalendar은 HTML에서 사용할 수 있게끔 HTML 태그를 붙여준다. 

>>> my_cal = calendar.HTMLCalendar()
### HTMLCalendar(firstweekday=0)로 인자지정가능하다. firstweekday는 어디가 요일의 시작일지 이다.

TextCalendar 객체가 제공하는 연산은 다음과 같다.

  • formatmonth(theyear,themonth,withyear=True) : 월의 달력을 html Table로 반환한다. withyear의 설정으로 연도를 헤더에 표현할지를 선택할 수 있다.
  • formatyear(theyear,width=3) : 연도의 달력을 html Table로 반환한다. width는 행에 얼만큼의 월이 들어 갈지 이다.
  • formatyearpage(theyear,width=3,css='calendar.css',encoding=True) : 연도의 달력을 완전한 html로 생성한다. css를 지정할 수 있다.

* TextCalendar에는 css를 재정의 할 수 있도록 여러가지 Attrib도 있으니 사용이 필요하다면 포스팅 끝의 공식 문서를 참고바란다.

 

 

 

정적 매서드

다음은 calendar에서 제공하는 정적 매서드이다. Calendar.매서드명 으로 객체 생성 없이 이용 가능하다.

  • setfirstweekday(weekday) : 현재 import된 모듈의 calendar weekday를 weeday로 고정한다 주의 첫요일이 바뀐다. calendar에는 리터럴로 calendar.MONDAY등을 제공하니 사용 바란다.
  • firstweekday() : 요일의 현재 설정을 반환한다.
  • leapdays(y1,y2) : y1년과 y2년 사이의 윤년의 수를 반환한다.
  • weekday(year,month,day) : year년 month월 day일의 요일을 반환한다.
  • weekheader(n) : 요일의 헤더를 반환한다. n은 헤더의 길이이다(1 : "F", 3 : "Fri" 등)
  • monthrange(year,month) : year년 month월의 첫날의 요일과 월의 일수를 반환한다.
  • monthcalendar(year,month) : year년 month의 행렬을 반환한다.
  • month(theyear,themonth,w=0,l=0) : TextCalendar의 formatmonth를 바로 이용 가능하게 한다.
  • calendar(year,w=0,l=0,c=6,m=3) : TextCalendar의 formatyear를 바로 이용 가능하게 한다.

 

 

어트리뷰트

다음은 Calendar가 가진 클래스 어트리뷰트이다.

  • calendar.day_name : 현재 로케일의 요일을 나타내는 배열이다.
  • calendar.day_abbr : 현재 로케일의 약식 요일을 나타내는 배열이다.
  • calendar.month_name : 현재 로케일의 연중 월을 나타낸다.
  • calendar.mont_abbr : 현재 로케일의 연중 월을 약식으로 나타낸다.

 

* 출처 : https://docs.python.org/ko/3/library/calendar.html

 

calendar — 일반 달력 관련 함수 — Python 3.9.5 문서

calendar — 일반 달력 관련 함수 소스 코드: Lib/calendar.py 이 모듈을 사용하면 유닉스 cal 프로그램과 같은 달력을 출력할 수 있으며, 달력과 관련된 유용한 추가 함수를 제공합니다. 기본적으로, 이

docs.python.org


정적 매서드의 프린팅 함수는 제외하고 기술했다. 참고하도록 하자

bzip2이라는 확장자가 있다. gzip과 비슷하게 하나의 파일만을 압축할 수 있으며, bz2라는 확장자명을 가진다. (오 모듈 이름이랑 똑같다.) 압축 과정은 다른 정보보안 이론과정에 자세하게 소개하는 것으로 하고 Python에서 bz2의 사용법을 알아보자


파일 압축/해제관련

  • bz2.open(filename, mode="rb"...) : 파일 혹은 데이터를 바이트 혹은 텍스트로 오픈하는 모드이다. 리턴 값은 File 객체이다. 
  • bz2.BZ2FILE(filename, mode="r") : 위에 객체 반환과 같으나, 무조건 binary로 open 한다.

증분 압축/해제관련

  • bz2.BZ2Compressor(compresslevel=9) : 증분 압축기 객체를 반환한다.  compress(data)와 flush()를 사용하고 이 객체는 사라진다.
  • bz2.BZ2Decompressor() : 증분 압축 해체기 객체를 반환한다. decompress(data)를 통해서 압축 해제된 data를 바이트 열로 가져올 수 있다.

일괄 압축/해제관련

  • bz2.compress(data,xompresslevel=9) : 일괄 압축을 수행한다.
  • bz2.decompress(data) : 압축된 data를 압축 해제해서 바이트 열을 반환한다.

사용 예제

import bz2

### 일괄 압축으로 압축하여 target.bz2에 작성
raw = b"I Love Python"
with open("target.bz2","wb") as f:
    f.write(bz2.compress(raw))

### 압축된 target.bz2 에서 문자열 읽기
with open("target.bz2","rb") as f:
    data = f.read()
    print(bz2.decompress(data).decode())

 

* 일괄 압축은 데이터를 인수로 주면서 바로 압축이 수행되고, 증분 압축방식은 압축기 개체가 생성되고 나서 데이터가 추가되는 방식이다.

 

출처 : https://docs.python.org/ko/3/library/bz2.html#incremental-de-compression

 

bz2 — bzip2 압축 지원 — Python 3.9.5 문서

bz2 — bzip2 압축 지원 소스 코드: Lib/bz2.py 이 모듈은 bzip2 압축 알고리즘을 사용하여 데이터 압축과 압축 해제를 위한 포괄적인 인터페이스를 제공합니다. bz2 모듈에는 다음이 포함됩니다: 이 모

docs.python.org

 

네트워크를 사용해서 프로그래밍을 하다 보면 빼놓을 수 없는 부분이 이 MAC address이다. IP와 같이 쉽게 변경이 불가하고(ARP나 VM은 논외로 하자 자신의 NIC MAC 주소만 두고 보았을 때다.) 앞의 24bit를 이용해서 제조사까지 알아낼 수 있기 때문에, 많은 프로토콜에서 이 MAC Address를 사용한다. 이번 시간에는 getmac모듈과 함께 Python에서 MAC 주소를 알 수 있는 방법을 알아보자


1. Python에서 MAC 주소 가져오기 - GETMAC

getmac은 하나의 매소드만을 제공하는 Python 외장함수이다. >> pip3 install getmac으로 가져와야 한다.(3.X기준)

### getmac의 사용 ###
>>> import getmac

>>> getmac.get_mac_address()
'XX:XX:XX:XX:XX:XX'

간단한 내용이다. getmac의 구현부를 보면 다음과 같은 매서드 정의부를 확인할 수 있다.

def get_mac_address(
    interface=None, ip=None, ip6=None, hostname=None, network_request=True
):
    # type: (Optional[str], Optional[str], Optional[str], Optional[str], bool) -> Optional[str]
    """Get a Unicast IEEE 802 MAC-48 address from a local interface or remote host.

    You must only use one of the first four arguments. If none of the arguments
    are selected, the default network interface for the system will be used.

    Exceptions will be handled silently and returned as a None.
    For the time being, it assumes you are using Ethernet.

    NOTES:
    * You MUST provide str-typed arguments, REGARDLESS of Python version.
    * localhost/127.0.0.1 will always return '00:00:00:00:00:00'

    Args:
        interface (str): Name of a local network interface (e.g "Ethernet 3", "eth0", "ens32")
        ip (str): Canonical dotted decimal IPv4 address of a remote host (e.g 192.168.0.1)
        ip6 (str): Canonical shortened IPv6 address of a remote host (e.g ff02::1:ffe7:7f19)
        hostname (str): DNS hostname of a remote host (e.g "router1.mycorp.com", "localhost")
        network_request (bool): Send a UDP packet to a remote host to populate
        the ARP/NDP tables for IPv4/IPv6. The port this packet is sent to can
        be configured using the module variable `getmac.PORT`.
    Returns:
        Lowercase colon-separated MAC address, or None if one could not be
        found or there was an error.
    """

그니까 정리를 하면 NIC에 대한 이름과, mac주소를 가져올 단말기의 ipv4, v6 주소, DNS 호스트네임을 지정할 수 있다는 의미이다.

 

아래의 방법도 MAC Address를 가져오는데 많이 사용된다.

 

 

2. Python에서 MAC 주소 가져오기 - psutil

>>> import psutil
>>> nics = psutil.net_if_addrs()
### nics는 네트워크 정보를 가진 Dictionary가 된다. 보고 추출하면 된다.

psutil module은 프로세스 관리에 주로 사용된다. RAM이나, 스레드의 상태를 확인하고 변경하는데 특화되어있다. 그중 net_if_addr() 함수는 네트워크의 정보를 가져온다.

 

 

3. Python에서 MAC 주소 가져오기 - uuid

>>> import uuid
>>> a = uuid.getnode()
>>> mac = ':'.join(("%012X" % a)[i:i+2] for i in range(0, 12, 2))

사용할 일이 있을 때 퍼가면 좋을 거 같다. 

 

사실 백과사전이라 할 것까지는 없다. Python의 백과사전은 언제까지나 Github와 google일 것이다. pydoc은 Python document의 약자인데, Python에서 사용되는 Keyword, 내장 모듈 등의 설명서를 나타낸다. 크게 2가지 사용법을 알아보겠다.


사용법 - 1 Python 인터프리터로 해석 

필자는 Python개발도구로 IDLE을 보통 사용한다. IDLE에서 다음과 같은 코드를 입력하자

>>> import pydoc
>>> pydoc.help()

Welcome to Python 3.9's help utility!

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at https://docs.python.org/3.9/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, symbols, or topics, type
"modules", "keywords", "symbols", or "topics".  Each module also comes
with a one-line summary of what it does; to list the modules whose name
or summary contain a given string such as "spam", type "modules spam".

help> 

pydoc에는 내장함수가 help하나 밖에 없다. help를 실행한 순간 help전용 대화형 인터프리터가 나온다. 예시로 yield 키워드를 help로 찾아보겠다.

help> yield
The "yield" statement
*********************

   yield_stmt ::= yield_expression

A "yield" statement is semantically equivalent to a yield expression.
The yield statement can be used to omit the parentheses that would
otherwise be required in the equivalent yield expression statement.
For example, the yield statements

   yield <expr>
   yield from <expr>

are equivalent to the yield expression statements

   (yield <expr>)
   (yield from <expr>)

Yield expressions and statements are only used when defining a
*generator* function, and are only used in the body of the generator
function.  Using yield in a function definition is sufficient to cause
that definition to create a generator function instead of a normal
function.

For full details of "yield" semantics, refer to the Yield expressions
section.

help> 

yield에 대한 사용법이 나온다. 리눅스 계열의 man명령어와 비슷하다고 볼 수 있겠다.  키워드 말고도 모듈도 검색할 수 있다.

help> pydoc
Help on module pydoc:

NAME
    pydoc - Generate Python documentation in HTML or text for interactive use.

MODULE REFERENCE
    https://docs.python.org/3.9/library/pydoc
    
    The following documentation is automatically generated from the Python
    source files.  It may be incomplete, incorrect or include features that
    are considered implementation detail and may vary between Python
    implementations.  When in doubt, consult the module reference at the
    location listed above.

DESCRIPTION
    At the Python interactive prompt, calling help(thing) on a Python object
    documents the object, and calling help() starts up an interactive
    help session.
    
    Or, at the shell command line outside of Python:
    
    Run "pydoc <name>" to show documentation on something.  <name> may be
    the name of a function, module, package, or a dotted reference to a
    class or function within a module or module in a package.  If the
    argument contains a path segment delimiter (e.g. slash on Unix,
    backslash on Windows) it is treated as the path to a Python source file.
    
    Run "pydoc -k <keyword>" to search for a keyword in the synopsis lines
    of all available modules.
    
    Run "pydoc -n <hostname>" to start an HTTP server with the given
    hostname (default: localhost) on the local machine.
    
    Run "pydoc -p <port>" to start an HTTP server on the given port on the
    local machine.  Port number 0 can be used to get an arbitrary unused port.
    
    Run "pydoc -b" to start an HTTP server on an arbitrary unused port and
    open a Web browser to interactively browse documentation.  Combine with
    the -n and -p options to control the hostname and port used.
    
    Run "pydoc -w <name>" to write out the HTML documentation for a module
    to a file named "<name>.html".
    
    Module docs for core modules are assumed to be in
    
        https://docs.python.org/X.Y/library/
    
    This can be overridden by setting the PYTHONDOCS environment variable
    to a different URL or to a local directory containing the Library
    Reference Manual pages.

DATA
    __all__ = ['help']
    help = <pydoc.Helper instance>

DATE
    26 February 2001

AUTHOR
    Ka-Ping Yee <ping@lfw.org>

CREDITS
    Guido van Rossum, for an excellent programming language.
    Tommy Burnette, the original creator of manpy.
    Paul Prescod, for all his work on onlinehelp.
    Richard Chamberlain, for the first implementation of textdoc.

FILE

이런 식으로 말이다.

 

사용법 - 2 웹페이지를 사용

웹페이지를 호스팅 하여 pydoc을 활용할 수 있다. python 2.X에는 pydocgui라는 tkinter(python의 gui프로그래밍을 도와주는 모듈)로 제작된 별도의 모듈이 있었는데, 3.X 버전부터는 명령 프롬포트에 다음과 같은 명령으로 localhost에 웹페이지를 호스팅 한다.

C:\Users>python -m pydoc -p 12345

이렇게 하면 12345번 포트인 http://localhost:12345에 python documentation이 호스팅 된다. 내부는 이런 모습이다.


자! 이번 시간에는 python의 백과사전인 pydoc에 대해서 알아보았다. 물론 대부분의 경우 공식 API홈페이지나 Github의 형님들의 힘을 빌리겠지만, 네트워크가 안 되는 상황이나, 구글 신의 힘을 빌려도 잘 모르겠는 사용법은 같이 참고할 수 있으면 좋다. 

* 여담인데, pydoc에 문법에 맞추어 내가 추가한 모듈의 사용법을 추가할 수도 있다. 물론 pydoc은 로컬에 한정한다.

Python도 역시 여러 가지 웹 기능을 제공한다. socket과 같은 네트워킹 목적으로 python을 사용하는 사람도 있고, httplib나 requests처럼 특정 사이트와의 패킷 교환을 담당해 주는 라이브러리가 그 대표적인 예시라고 할 수 있겠다. 이번 시간에는 그중 조금 독특한, 네트워크를 컴퓨터 환경에 맞게 사용할 수 있게 해주는 webbrowser를 알아보자


목적

webbrowser 모듈은 웹 기반 문서를 사용자에게 표시할 수 있는 고수준 인터페이스를 제공합니다. 대부분은, 이 모듈의 open() 함수를 호출하면 올바른 작업이 수행됩니다.

- Python 공식 홈페이지 https://docs.python.org/ko/3/library/webbrowser.html -

간단하게 말하면, 내 컴퓨터 환경에 맞추어 웹 통신을 할 수 있게 해준다는 이야기이다.

다음의 코드를 따라 쳐보자

>>> import webbrowser
>>> webbrowser.open("www.google.com")
True

이러면 기본으로 지정된 브라우저로 www.google.com이 열린다. 

 

webbrowser의 제공함수

webbrowser는 다음과 같은 내 컴퓨터에 사용되는 웹 브라우저를 통한 웹 기능을 제공한다.

1. webbrowser.open(url, new=0, autoraise=True) : 웹브라우저로 url을 open한다.

 - url : open할 url

 - new : 1이면 가능한 새로운 브라우저가 open 2면 탭으로 추가됨

 - autoraise 가 True면 창이 올라간다.(최대화같은데 모르겠다. 변화가 없더라)

1-1. webbrowser.open_new(url) : webborowser.open(url,new=1)과 같다.

1-2. webbrowser.open_new_tab(url) : webbrowser.open(url,new=2)와 같다.

2. webbrowser.register(name, constructor, instance, *, preferred=False) : 기본으로 열릴 브라우저를 선택한다. 기본 브라우저는 아래 공식 API를 참조하기 바란다.

docs.python.org/ko/3/library/webbrowser.html

 

webbrowser — 편리한 웹 브라우저 제어기 — Python 3.9.4 문서

webbrowser — 편리한 웹 브라우저 제어기 소스 코드: Lib/webbrowser.py webbrowser 모듈은 웹 기반 문서를 사용자에게 표시할 수 있는 고수준 인터페이스를 제공합니다. 대부분은, 이 모듈의 open() 함수를

docs.python.org

 

제어기 객체

webbrowser는 브라우저를 열어줄 제어기(Controller) 객체를 이용할 수 있다.

### webbrowser와 소통할 수 있는 controller를 가져온다. 
### controller는 webbrowser가 제공하는 위의 기능을 모두 사용할 수 있다. 
>>> controller = webbrowser.get()

 

 

* 출처 : Python API Webbrowser docs.python.org/ko/3/library/webbrowser.html

 

webbrowser — 편리한 웹 브라우저 제어기 — Python 3.9.4 문서

webbrowser — 편리한 웹 브라우저 제어기 소스 코드: Lib/webbrowser.py webbrowser 모듈은 웹 기반 문서를 사용자에게 표시할 수 있는 고수준 인터페이스를 제공합니다. 대부분은, 이 모듈의 open() 함수를

docs.python.org


이번 모듈 탐구 시간에 처음으로 네트워크를 사용한 Python을 써본 거 같다. webbrowser가 사용되는 경우가 흔한 상황은 아닌데, 쓸 때 기억이 안 나면 짜증 나긴 한다.

+ Recent posts