summaryrefslogtreecommitdiff
path: root/using python modules
diff options
context:
space:
mode:
authorPuneeth Chaganti2010-10-27 12:55:53 +0530
committerPuneeth Chaganti2010-10-27 12:55:53 +0530
commite557ef25bb79c38c9ab784b73082c841c9ec347d (patch)
tree3e433fb7a172cdf9770877bb2be43c3040afa26b /using python modules
parentbadbc7483c2aaf84ab84839d6aa2ec896a02cedf (diff)
parent6b8e910cc88032d3a7d61aa49e4b969a744ffc19 (diff)
downloadst-scripts-e557ef25bb79c38c9ab784b73082c841c9ec347d.tar.gz
st-scripts-e557ef25bb79c38c9ab784b73082c841c9ec347d.tar.bz2
st-scripts-e557ef25bb79c38c9ab784b73082c841c9ec347d.zip
Merged Heads.
Diffstat (limited to 'using python modules')
-rw-r--r--using python modules/script.rst19
1 files changed, 10 insertions, 9 deletions
diff --git a/using python modules/script.rst b/using python modules/script.rst
index e3190fd..c7103f6 100644
--- a/using python modules/script.rst
+++ b/using python modules/script.rst
@@ -36,6 +36,8 @@ In this tutorial, we will see how to run python scripts from command
line, importing modules, importing scipy and pylab modules. And also
see the Python standard library.
+.. #[Punch: the sentence seems discontinuous.]
+
{{{ switch to next slide on executing python scripts from command line }}}
Let us create a simple python script to print hello world. Open your
@@ -121,8 +123,8 @@ Now let us run the script again,
python four_plot.py
-Now it gave another error plot not defined, let us edit the file again
-and add the line below the line we just added,
+Now it gave another error -- plot not defined, let us edit the file
+again and add the line below the line we just added,
{{{ switch to next slide, fix ``plot`` problem }}}
@@ -154,7 +156,7 @@ instead of,
from scipy import *
So in practice it is always good to use function names instead of
-asterisk or star. As if we use asterisk to import from a particular
+asterisk or star. If we use asterisk to import from a particular
module then it will replace any existing functions with the same name
in our name-space.
@@ -208,8 +210,8 @@ We can run it as,
{{{ switch to next slide, What is a module? }}}
-So till now we have been learning about importing modules, now what is
-a module?
+Until now we have been learning about importing modules, now what is a
+module?
A module is simply a file containing Python definitions and
statements. Definitions from a module can be imported into other
@@ -217,10 +219,9 @@ modules or into the main module.
{{{ switch to next slide, Python standard library }}}
-Python has a very rich standard library of modules
-
-Python's standard library is very extensive, offering a wide range of
-facilities. Some of the standard modules are,
+Python has a very rich standard library of modules. It is very
+extensive, offering a wide range of facilities. Some of the standard
+modules are,
for Math: math, random
for Internet access: urllib2, smtplib