Skip to Content
전문가를 위한 파이썬(2판)
book

전문가를 위한 파이썬(2판)

by 루시아누 하말류, 강권학
November 2024
Beginner to intermediate
1064 pages
25h 21m
Korean
Hanbit Media, Inc.
Content preview from 전문가를 위한 파이썬(2판)
188
1
데이터 구조체
> python default_encodings.py
locale.getpreferredencoding() -> ‘cp1252’ ❸
type(my_file) -> <class ‘_io.TextIOWrapper’>
my_file.encoding -> ‘cp1252’ ❹
sys.stdout.isatty() -> True ❺
sys.stdout.encoding -> ‘utf-8’ ❻
sys.stdin.isatty() -> True
sys.stdin.encoding -> ‘utf-8’
sys.stderr.isatty() -> True
sys.stderr.encoding -> ‘utf-8’
sys.getdefaultencoding() -> ‘utf-8’
sys.getfilesystemencoding() -> ‘utf-8’
chcp
는 콘솔의 코드 페이지 (
437
)를 보여 준다.
default
_
encodings
.
py
를 실행해 결과를 콘솔에 출력한다.
locale
.
getpreferredencoding
()
이 가장 중요한 설정이다.
❹ 텍스트 파일은 기본적으로
locale
.
getpreferredencoding
()
을 사용한다.
❺ 출력이 콘솔로 나가므로
sys
.
stdout
.
isatty
()
True
다.
sys
.
stdout
.
encoding ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

전문가를 위한 리액트

전문가를 위한 리액트

테자스 쿠마르
고성능 파이썬(2판)

고성능 파이썬(2판)

오현석, 미샤 고렐릭, 이안 오스발트

Publisher Resources

ISBN: 9791169211772