Boston Python Workshop 8/Friday/Windows interactive Python: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Jesstess
No edit summary
imported>Jesstess
No edit summary
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
<li>Open a command prompt:<br />
<li>Open a command prompt:<br />
* On Windows Vista or Windows 7: click on the Start menu (the Windows logo in the lower left of the screen), type <code>cmd</code> into the Search field directly above the Start menu button, and click on "cmd" in the search results above the Search field.
* On Windows Vista or Windows 7: click on the Start menu (the Windows logo in the lower left of the screen), type <code>cmd</code> into the Search field directly above the Start menu button, and click on "cmd" in the search results above the Search field.
* On Windows XP: click on the Start menu (the Windows logo in the lower left of the screen), click on "Run...", type <code>cmd</code> into the text box, and hit enter.
* On Windows XP: click on the Start menu (the Windows logo in the lower left of the screen), click on "Run...", type <code>cmd</code> into the text box, and press enter.
<li>To start Python, type <pre>python</pre> at the command prompt and hit enter. You should see something like
<li>To start Python, type <pre>python</pre> at the command prompt and press enter. You should see something like


<pre>
<pre>
Python 2.7.1 (r271:86832, ...) on win32
Python 2.7.5 (r271:86832, ...) on win32
Type "help", "copyright", "credits" or "license" for more information.
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
Line 16: Line 16:
</li>
</li>


<li>Exit the Python prompt by typing <pre>exit()</pre> and hitting enter. Now you're back at the Windows command prompt (<code>C:\</code>).</li>
<li>Exit the Python prompt by typing <pre>exit()</pre> and pressing enter. Now you're back at the Windows command prompt (<code>C:\</code>).</li>
</ol>
</ol>



Latest revision as of 00:45, 12 July 2013

Practice starting and exiting Python

  1. Open a command prompt:
    • On Windows Vista or Windows 7: click on the Start menu (the Windows logo in the lower left of the screen), type cmd into the Search field directly above the Start menu button, and click on "cmd" in the search results above the Search field.
    • On Windows XP: click on the Start menu (the Windows logo in the lower left of the screen), click on "Run...", type cmd into the text box, and press enter.
  2. To start Python, type
    python
    at the command prompt and press enter. You should see something like
    Python 2.7.5 (r271:86832, ...) on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    

    The >>> indicates that you are at a Python prompt.

  3. Exit the Python prompt by typing
    exit()
    and pressing enter. Now you're back at the Windows command prompt (C:\).

Success!

Practice these steps until you feel comfortable navigating to a command prompt, starting Python, and exiting Python.

« Back to the Friday setup page