forked from OpenTechSchool/python-beginners
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetting_started.html
More file actions
341 lines (308 loc) · 24.1 KB
/
getting_started.html
File metadata and controls
341 lines (308 loc) · 24.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>시작하기 — Introduction to Programming with Python</title>
<link rel="stylesheet" href="_static/basic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<link rel="stylesheet" href="_static/bootstrap-3.3.4/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="_static/bootstrap-3.3.4/css/bootstrap-theme.min.css" type="text/css" />
<link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '2015.10.02',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/translations.js"></script>
<script type="text/javascript" src="_static/spoilers.js"></script>
<script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/js/jquery-fix.js"></script>
<script type="text/javascript" src="_static/bootstrap-3.3.4/js/bootstrap.min.js"></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js"></script>
<link rel="copyright" title="저작권" href="copyright.html" />
<link rel="top" title="Introduction to Programming with Python" href="index.html" />
<link rel="next" title="거북이로 간단하게 그리기" href="simple_drawing.html" />
<link rel="prev" title="파이썬 프로그래밍 소개" href="index.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
</head>
<body role="document">
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
Python for Beginners</a>
<span class="navbar-text navbar-version pull-left"><b>2015.10.02</b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li class="dropdown globaltoc-container">
<a role="button"
id="dLabelGlobalToc"
data-toggle="dropdown"
data-target="#"
href="index.html">Material <b class="caret"></b></a>
<ul class="dropdown-menu globaltoc"
role="menu"
aria-labelledby="dLabelGlobalToc"><ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="">시작하기</a></li>
<li class="toctree-l1"><a class="reference internal" href="simple_drawing.html">거북이로 간단하게 그리기</a></li>
<li class="toctree-l1"><a class="reference internal" href="variables.html">Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="loops.html">순환</a></li>
<li class="toctree-l1"><a class="reference internal" href="functions.html">사용자가 정의한 함수</a></li>
<li class="toctree-l1"><a class="reference internal" href="functions_parameters.html">매개 변수가 있는 함수</a></li>
<li class="toctree-l1"><a class="reference internal" href="conditionals.html">조건문</a></li>
<li class="toctree-l1"><a class="reference internal" href="conditional_loops.html">조건 순환 반복</a></li>
<li class="toctree-l1"><a class="reference internal" href="logical_operators.html">논리 연산자</a></li>
<li class="toctree-l1"><a class="reference internal" href="where_to_go.html">어디로 가야 하나요?</a></li>
<li class="toctree-l1"><a class="reference internal" href="copyright.html">라이선스</a></li>
</ul>
</ul>
</li>
<li class="dropdown">
<a role="button"
id="dLabelLocalToc"
data-toggle="dropdown"
data-target="#"
href="#">Chapter <b class="caret"></b></a>
<ul class="dropdown-menu localtoc"
role="menu"
aria-labelledby="dLabelLocalToc"><ul>
<li><a class="reference internal" href="#">시작하기</a><ul>
<li><a class="reference internal" href="#what-you-ll-need">필요한 것은</a><ul>
<li><a class="reference internal" href="#a-python">파이썬이죠~!</a></li>
<li><a class="reference internal" href="#and-a-code-editor">그리고 코드 편집기요</a></li>
</ul>
</li>
<li><a class="reference internal" href="#what-is-python-exactly">그래서 파이썬이 정확하게 뭐라는건가요?</a><ul>
<li><a class="reference internal" href="#opening-a-console-on-mac-os-x">맥 OS X에서 콘솔을 열어보아요</a></li>
<li><a class="reference internal" href="#opening-a-console-on-linux">리눅스 콘솔을 열어보아요</a></li>
<li><a class="reference internal" href="#opening-a-console-on-windows">윈도우즈에서 콘솔을 열어보아요</a></li>
</ul>
</li>
<li><a class="reference internal" href="#using-python">파이선 사용하기</a><ul>
<li><a class="reference internal" href="#interacting-with-python">파이선을 다루어보아요</a></li>
<li><a class="reference internal" href="#running-python-files">파이썬 파일 실행</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</ul>
</li>
<li class="navbar-rel">
<a href="index.html" title="Previous Chapter: 파이썬 프로그래밍 소개">
<span class="glyphicon glyphicon-step-backward"></span>
<span>Previous</span>
</a>
</li>
<li class="navbar-rel">
<a href="simple_drawing.html" title="Next Chapter: 거북이로 간단하게 그리기">
<span class="glyphicon glyphicon-step-forward"></span>
<span>Next</span>
</a>
</li>
<li class="dropdown">
<a role="button"
data-toggle="dropdown"
data-target="#"
href="#">Languages <b class="caret"></b></a>
<ul class="dropdown-menu"
role="menu">
<li><a href="../en/index.html">English</a></li>
<li><a href="../de/index.html">Deutsch (German)</a></li>
<li><a href="../es_CL/index.html">Español (Spanish)</a></li>
<li><a href="../ru/index.html">русский (Russian)</a></li>
<li><a href="../ko/index.html">한국인 (Korean)</a></li>
<li><a href="../ro/index.html">Română (Romanian)</a></li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-right" action="search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="section" id="getting-started">
<h1>시작하기<a class="headerlink" href="#getting-started" title="제목 주소">¶</a></h1>
<div class="section" id="what-you-ll-need">
<h2>필요한 것은<a class="headerlink" href="#what-you-ll-need" title="제목 주소">¶</a></h2>
<div class="section" id="a-python">
<h3>파이썬이죠~!<a class="headerlink" href="#a-python" title="제목 주소">¶</a></h3>
<p>파이썬을 아직 못 구했다면, 최신 공식 설치 꾸러미를 다음에서 찾을 수 있어요:</p>
<p><a class="reference external" href="http://python.org/download/">http://python.org/download/</a></p>
<p>출시된 새 버전으로는 파이썬 3이 적당할 수 있어요!</p>
<div class="admonition note">
<p class="first admonition-title">주석</p>
<p class="last">윈도우즈에서는, <strong class="program">파이썬`을 경로에 추가하여 다른 프로그램이 찾게 할 수 있어요. 이렇게 하려면 설치 디렉터리를 찾아서(:file:`C:\Python33\</strong>), <code class="file docutils literal"><span class="pre">Tools</span></code> 를 열고, :file: <cite>Scripts`를 연 다음, :file:`win_add2path.py</cite> 파일을 두 번 눌러 실행하세요.</p>
</div>
</div>
<div class="section" id="and-a-code-editor">
<h3>그리고 코드 편집기요<a class="headerlink" href="#and-a-code-editor" title="제목 주소">¶</a></h3>
<p>코드 편집기는 프로그래밍 코드를 읽고 작성하는데 도움을 줘요. 여러가지가 있는데 테니스 선수가 라켓을 고르거나 주방장이 맘에 드는 식칼을 고르는 것처럼 프로그래머가 고를 수 있는 개개인이 가장 많이 선택하는 것이기도 해요. 시작하려면, 기본적이고, 써보지는 못했지만 사용하기 쉬워야 하지만 파이썬 코드 작성에 효율적이어야죠. 몇가지 소개좀 해볼께요:</p>
<ul class="simple">
<li><p class="first"><a class="reference external" href="http://www.sublimetext.com/">서브라임 텍스트</a>: 편집기 중에서도 사용하기 쉬운 완벽한 편집기예요. Ctrl+B 단축키로 작업중인 파이썬 파일을 바로 실행하게 해줘요. 윈도우즈, 맥, 리눅스에서 동작해요.</p>
</li>
<li><p class="first"><a class="reference external" href="http://www.geany.org/">Geany</a>: 복잡하지 않음을 목표로한 단순한 편집기예요. 윈도우즈와 리눅스에서 사용할 수 있어요(꾸러미 관리자에서 찾을 수 있을지도 몰라요).</p>
</li>
<li><p class="first"><a class="reference external" href="http://macromates.com/">텍스트메이트</a>: 맥용 코드 데이터로는 가장 잘 알려져 있는데요, 유료 제품이지만 소스는 이미 공개되어 있어요.</p>
</li>
<li><p class="first"><a class="reference external" href="https://projects.gnome.org/gedit/">Gedit</a> 와 <a class="reference external" href="http://kate-editor.org/">Kate</a>: 그놈이나 KDE 둘 중 하나를 사용하면, 이미 둘 중 하나는 설치되어 있을지도 몰라요!</p>
</li>
<li><p class="first"><a class="reference external" href="http://www.activestate.com/komodo-edit">Komodo Edit</a>: 좀 강력한 코모도 IDE를 기반으로 하는 뽀대나는 공짜 편집기인데요. 맥용, 윈도우용, 리눅스용이 있어요.</p>
</li>
</ul>
<p>추천해주는게 좋다면, 먼저 서브라임 텍스트를 써보세요.</p>
<div class="admonition tip">
<p class="first admonition-title">참고</p>
<p class="last">워드패드, 텍스트에디트, 노드패드, 워드는 텍스트 편집기로 <strong>적당하지 않아요</strong>.</p>
</div>
</div>
</div>
<div class="section" id="what-is-python-exactly">
<h2>그래서 파이썬이 정확하게 뭐라는건가요?<a class="headerlink" href="#what-is-python-exactly" title="제목 주소">¶</a></h2>
<p>네, 그래서 파이썬은 <a href="#id1"><span class="problematic" id="id2">**</span></a>프로그래밍 언어**라고 하는거예요. 여러분이 쓴 텍스트(보통 <a href="#id3"><span class="problematic" id="id4">**</span></a>코드**라고 해요)를 받아서요, 컴퓨터에 명령으로 바꿔서 전달하고, 이 명령을 실행해줍니다. 앞으로 쌈박하고 쓸모 있는 동작을하는 코드를 어떻게 작성할지 배울거예요. 컴퓨터로 무언가를 하는데 다른 프로그램을 써야 할 일은 앞으로 없을거예요!</p>
<p>실제로, 파이썬은 컴퓨터의 다른 프로그램일 뿐이예요. 먼저 배우게 될건 어떻게 쓰고 다루느냐예요. 사실 다루는덴 여러가지 방법이 있죠. 먼저 배울건 <a href="#id1"><span class="problematic" id="id2">**</span></a>운영 체제**(OS)의 콘솔을 활용해서 파이선 인터프리터와 대화 하는 방법이예요.</p>
<p><strong>콘솔</strong> (또는 ‘터미널’,’명령 프롬프트’)은 시스템에서 마우스와 결합한 ‘데스크톱’이 OS와 의사소통을 하는 방식이 <em>그래픽</em> 방식인것과 같이, <em>글자</em> 방식으로 OS와 의사소통하는 방식이예요.</p>
<div class="section" id="opening-a-console-on-mac-os-x">
<h3>맥 OS X에서 콘솔을 열어보아요<a class="headerlink" href="#opening-a-console-on-mac-os-x" title="제목 주소">¶</a></h3>
<p>OS X의 표준 콘솔은 :program:’터미널’이라고 해요. 응용 프로그램, 유틸리티를 들어가서 :program:<a href="#id1"><span class="problematic" id="id2">`</span></a>터미널`프로그램을 두 번 눌러서 터미널을 여세요. 우측 상단의 시스템 검색 도구를 사용하면 쉽게 찾을 수 있어요.</p>
<p>명령행 터미널은 컴퓨터와 대화하는 도구예요. 다음처럼 명령행 프롬프트 메시지를 띄운 창이 뜰거예요:</p>
<div class="highlight-python"><div class="highlight"><pre>mycomputer:~ myusername$
</pre></div>
</div>
</div>
<div class="section" id="opening-a-console-on-linux">
<h3>리눅스 콘솔을 열어보아요<a class="headerlink" href="#opening-a-console-on-linux" title="제목 주소">¶</a></h3>
<p>제각각의 리눅스 배포판(예: 우분투, 페도라, 민트)은 제각각의 콘솔 프로그램이 있는데요, 보통 터미널이라고 해요. 정확하게 시작하는 터미널이랑 방식은 배포판에 따라 달라요. 우분투에서는 :program:<a href="#id1"><span class="problematic" id="id2">`</span></a>그놈 터미널`같은걸 열려고 하겠죠. 다음처럼 생긴 프롬프트가 보일거예요:</p>
<div class="highlight-python"><div class="highlight"><pre>myusername@mycomputer:~$
</pre></div>
</div>
</div>
<div class="section" id="opening-a-console-on-windows">
<h3>윈도우즈에서 콘솔을 열어보아요<a class="headerlink" href="#opening-a-console-on-windows" title="제목 주소">¶</a></h3>
<p>윈도우 콘솔 이름은 <strong class="program">cmd`라고 하고 명령 프롬프트라고 해요. 명령 프롬프트를 불러오는 쉬운 방법은 그냥 단축키 :kbd:`Windows+R`를 써서 (:kbd:`Windows`윈도우 로고 단추를 의미해요), :guilabel:`실행</strong> 대화 상자를 여는거예요. 그 다음 <strong class="program">cmd</strong> 를 입력하고 :kbd:<a href="#id1"><span class="problematic" id="id2">`</span></a>Enter`키를 치거나 :guilabel:<a href="#id3"><span class="problematic" id="id4">`</span></a>확인`을 누르세요. 시작 메뉴에서 찾아볼 수도 있어요. 다음과 같은게 떠야해요:</p>
<div class="highlight-python"><div class="highlight"><pre>C:\Users\myusername>
</pre></div>
</div>
<p>윈도우 명령 프롬프트는 리눅스나 OS X에서와 같이 강력한건 아닌지라 파이썬 인터프리터를 (아래 처럼) 직접 시작하거나, 파이썬에 딸려오는 IDLE 프로그램을 활용하는게 좋을거예요. 시작 메뉴에서 찾을 수 있어요.</p>
</div>
</div>
<div class="section" id="using-python">
<h2>파이선 사용하기<a class="headerlink" href="#using-python" title="제목 주소">¶</a></h2>
<p>설치한 파이선 프로그램은 기본적으로 <a href="#id1"><span class="problematic" id="id2">**</span></a>인터프리터**라고 하는 것처럼 동작할거예요. 인터프리터는 입력한대로 명령을 받아서 실행해요. 무언가를 해볼때 참 간편하죠.</p>
<p>콘솔에서 :program:<a href="#id1"><span class="problematic" id="id2">`</span></a>python`를 입력하고 :kbd:<a href="#id3"><span class="problematic" id="id4">`</span></a>Enter`키를 치면, 파이선 인터프리터로 들어가게 돼요.</p>
<p>실행하는 파이선 버전을 확인해보려면 <code class="docutils literal"><span class="pre">python</span> <span class="pre">-V</span></code> 명령을 사용하세요.</p>
<div class="section" id="interacting-with-python">
<h3>파이선을 다루어보아요<a class="headerlink" href="#interacting-with-python" title="제목 주소">¶</a></h3>
<p>파이썬을 열면, 다음과 같이 상황 정보가 나타나요:</p>
<div class="highlight-python"><div class="highlight"><pre>Python 3.3.2 (default, May 21 2013, 15:40:45)
[GCC 4.8.0 20130502 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">주석</p>
<p class="last">마지막 줄의 <strong>>>></strong> 프롬프트는 대화형 파이선 인터프리터 세션에 있다는걸 보여주는데 이걸 “파이썬 쉘” 이라고 해요. <strong>보통 터미널 명령 프롬프트와는 달라요!</strong></p>
</div>
<p>몇가지 파이선 코드를 입력할 수 있어요. 해보세요:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span><span class="p">(</span><span class="s">"Hello world"</span><span class="p">)</span>
</pre></div>
</div>
<p>:kbd:<a href="#id1"><span class="problematic" id="id2">`</span></a>Enter`키를 눌러 어떤 일이 일어나는지 보세요. 결과를 표시하고 나면 파이썬에서는 다른 명령을 입력할 수 있는 대화 프롬프트로 돌아갑니다.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="k">print</span><span class="p">(</span><span class="s">"Hello world"</span><span class="p">)</span>
<span class="go">Hello world</span>
<span class="gp">>>> </span><span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="mi">4</span><span class="p">)</span> <span class="o">*</span> <span class="mi">2</span>
<span class="go">10</span>
</pre></div>
</div>
<p>상당히 쓸모있는 명령은 <code class="docutils literal"><span class="pre">help()</span></code> 인데요, 도움말 기능으로 들어가서 동작해보려는 파이선의 모든 요소를 탐색하고 결과를 인터프리터에 바로 뿌려줘요. :kbd:<a href="#id1"><span class="problematic" id="id2">`</span></a>q`를 입력하면 도움말 창을 닫고 파이썬 프롬프트로 돌아가요.</p>
<p>대화형 쉘을 나가려면 <code class="kbd docutils literal"><span class="pre">Ctrl-Z`를</span> <span class="pre">누르고,</span> <span class="pre">윈도우에서는</span> <span class="pre">:kbd:`Enter</span></code>, OS X나 리눅스에서는 :kbd:<a href="#id1"><span class="problematic" id="id2">`</span></a>Ctrl-D`를 누르세요. 대신 파이선 명령 <a href="#id3"><span class="problematic" id="id4">``</span></a>exit()``를 실행할 수도 있어요!</p>
</div>
<div class="section" id="running-python-files">
<h3>파이썬 파일 실행<a class="headerlink" href="#running-python-files" title="제목 주소">¶</a></h3>
<p>실행할 많은 파이선 코드가 있으면 파일로 저장할 수 있는데요, 가령 코드 일부를 고칠 수 있고요(버그 고치기), 나머지 부분을 다시 반복해서 입력하지 않아도 실행할 수 있어요. 대신 파일에 코드를 저장할 수 있고요, :program:<a href="#id1"><span class="problematic" id="id2">`</span></a>python`에서 실행할 수 있게 파일 이름을 전달할 수 있어요. 대화형 인터프리터를 실행하는 대신에 파일을 바로 실행해줘요.</p>
<p><strong>다음을 해보기로 하죠</strong>. <code class="file docutils literal"><span class="pre">hello.py</span></code> 파일을 즐겨 사용하는 텍스트 편집기로 현재 디렉터리에 만들고 위에 작성한 프린트 명령을 작성해보세요. 이제 파일을 저장하세요. 리눅스나 OS X에서는 <a href="#id1"><span class="problematic" id="id2">``</span></a>touch hello.py``를 실행해서 편집할 빈 파일을 만들 수 있어요. 파이썬으로 파일을 실행한다면, 굉장히 쉬워요:</p>
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>python hello.py
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">주석</p>
<p class="last">마지막에 파이선 프롬프트가 아니라(<code class="docutils literal"><span class="pre">`>>>`</span></code> 표시가 있어요), <a href="#id1"><span class="problematic" id="id2">``</span></a>$``나 <a href="#id3"><span class="problematic" id="id4">``</span></a>>``가 있는 시스템 명령 프롬프트에 있는지 확인해보세요!</p>
</div>
<p>윈도우에서는 파이선 파일을 두 번 눌러서 실행할 수 있어요.</p>
<p>이제 <code class="kbd docutils literal"><span class="pre">Enter</span></code> 키를 누르면, 파일을 실행하고 이전에 본 출력 내용을 볼 수 있어요, 근데 지금은 파이썬이 파일에 있는 모든 명령을 다 실행한 다음에 대화 쉘로 돌아가는 대신, 시스템 명령 프롬프트로 빠져나와요.</p>
<p>그리고 이제 더 설정했으니 거북이를 가지고 시작해보기로 하죠!</p>
<div class="admonition note">
<p class="first admonition-title">주석</p>
<p>“Hello world”가 뜨지 않고 “can’t open file” 또는 “No such file or directory”같은 미치게 만드는 오류가 뜨나요? 파일을 저장한 디렉터리에서 실행이 안될 수도 있어요. 시스템 명령 줄에서 <strong class="command">cd</strong> 명령을 사용해서 현재 활성 디렉터리를 바꿀 수 있어요. 이 명령은 “change directory”를 의미해요. 윈도우에서는 다음과 같이 되겠죠:</p>
<div class="highlight-python"><div class="highlight"><pre>> cd Desktop\Python_Exercises
</pre></div>
</div>
<p>리눅스나 OS X에서는 다음 처럼 나타날거예요:</p>
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span><span class="nb">cd </span>Desktop/Python_Exercises
</pre></div>
</div>
<p class="last">이 명령으로 Desktop 폴더의 Python_Exercises 디렉터리로 바뀌어요(어디에 있느냐에 따라 다를 수도 있어요). 파일을 어디에 저장하는디 디렉터리 위치를 모르겠다면 그냥 디렉터리를 명령행 창에 끌어다 넣으세요. 쉘이 돌아가는 디렉터리의 위치가 어딘지 잘 모르겠다면 “print working directory”를 의미하는 <strong class="command">pwd</strong> 명령을 활용하세요.</p>
</div>
<div class="admonition warning">
<p class="first admonition-title">경고</p>
<p class="last">거북이를 가지고 놀 때, <code class="file docutils literal"><span class="pre">turtle.py</span></code> 파일 이름으로 저장하는건 피해주세요. 대신 <code class="file docutils literal"><span class="pre">square.py</span></code> 또는 :file:<a href="#id1"><span class="problematic" id="id2">`</span></a>rectangle.py`같은 적당한 이름으로 지어주세요. 그렇지 않으면 <a href="#id3"><span class="problematic" id="id4">``</span></a>turtle``을 참조할 때, 파이썬에서는 기존의 거북이 대신 <a href="#id5"><span class="problematic" id="id6">*</span></a>여러분*의 파일을 가져와요.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<p class="pull-right">
<a href="#">Back to top</a>
<br/>
<ul id="sourcelink" class="list-inline">
<li>
<a href="https://github.com/opentechschool/python-beginners/edit/master/source/getting_started.rst" title="getting_started.rst">
Edit on Github
</a>
</li>
<li>
<a href="https://github.com/OpenTechSchool/python-beginners/issues/new?title=Problem+with+getting_started">
Report a problem
</a>
</li>
</ul>
</p>
<p>
© <a href="copyright.html">Copyright</a> 2012–2014, OpenTechSchool and contributors.<br/>
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1.<br/>
</p>
</div>
</footer>
</body>
</html>