# HG changeset patch # User Puneeth Chaganti # Date 1288164010 -19800 # Node ID 8f6b3acb39ecf5cac25d17ca89c6fe00425fe855 # Parent 75a182d6e9083d18bf025d28f7121a1d9ec775f8 Reviewed using python modules LO. diff -r 75a182d6e908 -r 8f6b3acb39ec using python modules/script.rst --- a/using python modules/script.rst Tue Oct 26 20:54:21 2010 +0530 +++ b/using python modules/script.rst Wed Oct 27 12:50:10 2010 +0530 @@ -36,6 +36,8 @@ 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 @@ 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 @@ 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 @@ {{{ 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 @@ {{{ 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