Skip to Content
밑바닥부터 시작하는 딥러닝
book

밑바닥부터 시작하는 딥러닝

by 사이토 고키, 개앞맵시(이복연)
January 2017
Beginner to intermediate
312 pages
7h 3m
Korean
Hanbit Media, Inc.
Content preview from 밑바닥부터 시작하는 딥러닝
34
밑바닥부터 시작하는 딥러닝
1.4
파이썬 스크립트 파일
지금까지 파이썬 인터프리터를 활용하는 예를 보았습니다. 파이썬 인터프리터는 파이썬 코드
를 대화식으로 실행해보며 간단한 실험을 수행하기에 딱 좋습니다. 그러나 긴 작업을 수행해야
한다면, 매번 코드를 입력해야 하는 이 방식은 조금 불편하겠죠. 이럴 때는 파이썬 프로그램을
파일로 저장하고 그 파일을 (함께 ) 실행하는 방법이 있습니다. 이번 절에서는 그런 파이썬 스
크립트 파일의 예를 살펴보겠습니다.
1.4.1
파일로 저장하기
텍스트 편집기를 열고
hungry
.
py
라는 파일을 작성합니다.
hungry
.
py
는 다음의 한 줄만으로
구성된 파일입니다.
print
("
I
'
m hungry
!")
이어서 터미널을 열고 앞의
hungry
.
py
를 저장한 디렉터리로 이동합니다. 그런 다음 파일 이
름은 “
hungry
.
py
”를 인수로 지정해
python
명령을 실행합니다. 여기에서는
hungry
.
py
가
~/
deep
-
learning
-
from
-
scratch
/
ch01
디렉터리에 있다고 가정합니다.
$
cd
~/
deep
-
learning
-
from
-
scratch
/
ch01
# 디렉터리로 이동
$
python hungry
.
py
I
'
m hungry
!
이처럼
python
hungry
.
py
명령으로 파이썬 프로그램을 실행할 수 있습니다.
1.4.2
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

밑바닥부터 시작하는 비트코인

밑바닥부터 시작하는 비트코인

류정필, 송재준
엑셀이 편해지는 파이썬

엑셀이 편해지는 파이썬

펠릭스 춤슈타인

Publisher Resources

ISBN: 9788968484636