Montreal Python Workshop/Friday/Linux interactive Python: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Gward
(Created page with "{{:Boston_Python_Workshop_7/Friday/Linux_interactive_Python}}")
 
imported>Merwok
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Most operating systems based on Linux ship with Python installed, so the goal of this page is to make sure you can start a terminal and run Python from the command line.
{{:Boston_Python_Workshop_7/Friday/Linux_interactive_Python}}

<ol>
<li>Start up a terminal. You can find a terminal application in the main menu, or it may already be on your menu bar.<br />

<li>To start Python, type

<pre>
python
</pre>

at the comand prompt and hit enter. You should see something like
<pre>
Python 2.7.1 (r252:60911, Jan 24 2011, 17:44:40)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
</pre>

The <code>>>></code> indicates that you are at a Python prompt.</li>
<li>Exit the Python prompt by typing

<pre>
exit()
</pre>

and hitting enter. Now you're back at the Linux command prompt (which looks something like <code>jesstess$</code>).</li>
</ol>

===Success!===

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

[[Montreal Python Workshop/Friday|&laquo; Back to the Friday setup page]]

Latest revision as of 02:52, 20 February 2013

Most operating systems based on Linux ship with Python installed, so the goal of this page is to make sure you can start a terminal and run Python from the command line.

  1. Start up a terminal. You can find a terminal application in the main menu, or it may already be on your menu bar.
  2. To start Python, type
    python
    

    at the comand prompt and hit enter. You should see something like

    Python 2.7.1 (r252:60911, Jan 24 2011, 17:44:40) 
    [GCC 4.3.2] on linux2
    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 hitting enter. Now you're back at the Linux command prompt (which looks something like jesstess$).

Success!

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

« Back to the Friday setup page