Difference between revisions of "Python1"

From SourceWiki
Jump to navigation Jump to search
Line 5: Line 5:
  
 
[[Image:Python.png|center|http://xkcd.com/353/]]
 
[[Image:Python.png|center|http://xkcd.com/353/]]
 +
 +
=Getting Started on BlueCrystal Phase-2=
 +
 +
After you have logged in, type the following at the command line:
 +
 +
<pre>
 +
module add languages/python-2.7.2.0
 +
python
 +
</pre>
 +
 +
This should start up an interactive python session:
 +
 +
<pre>
 +
Python 2.7.2 (default, Aug 25 2011, 10:51:03)
 +
[GCC 4.3.3] on linux2
 +
Type "help", "copyright", "credits" or "license" for more information.
 +
>>>
 +
</pre>
 +
 +
where we can type commands at the '''>>>''' prompt.
  
 
=Python as a Calculator=
 
=Python as a Calculator=
 +
 +
Let's try a few commands out:

Revision as of 14:26, 2 October 2012

Python for Scientists

Introduction

http://xkcd.com/353/

Getting Started on BlueCrystal Phase-2

After you have logged in, type the following at the command line:

module add languages/python-2.7.2.0
python

This should start up an interactive python session:

Python 2.7.2 (default, Aug 25 2011, 10:51:03) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

where we can type commands at the >>> prompt.

Python as a Calculator

Let's try a few commands out: