What do you mean by python scripting What is a script and a module in python

+1 vote
Apr 18, 2018 in Python by ned_crew
• 1,610 points


7 answers to this question.

+1 vote


answered Apr 18, 2018 by Johnathon
• 9,090 points
Thq .....
For ........edureka
+2 votes






if __name__ == '__main__':

answered Mar 14, 2019 by rajesh kumar
+2 votes

answered Jun 17, 2019 by Zain Abbas
Thanks! That was a clear explanation
So modules are like libraries?
0 votes


answered Jun 7, 2020 by sahil
• 540 points
0 votes
A script is a .py file that contains multiple Python commands that are usually run sequentially. Scripts are usually used to conduct a specific task, or solve a specific problem. Scripts often use functions and other programming tools that are contained in modules.

A module is also a .py file, and also contains multiple Python commands. However, usually these commands are organized into functions and other organizational bundles like classes, and the commands are not run sequentially. Instead the commands are run in an on-demand basis, where the module user (often a script) specifies which of the module's functions and/or commands should be executed, and at what point(s) in the script.  Modules do not conduct specific tasks or solve specific problems. Instead, their functions and classes are meant to be general-use tools that can be used to solve a variety of problems.

As an example, consider a simple task like downloading the forecasted maximum temperature for today from your favorite weather website. A script for conducting this task would access the website, download the relevant data, then report the result to you, possibly by printing the forecasted maximum temperature to the screen of your computer. The script might also use a variety of modules, including especially a web-access module, which contains functions for accessing websites and downloading relevant data from them. In this case, the module's functions would allow you to access not only your favorite weather website, but any website.

You can therefore think of scripts as a specific-purpose sequence of commands, and modules as a general-purpose set of programming tools.
answered Oct 6, 2020 by 0todd000
0 votes

Python script is a collection of commands in a file designed to be executed like a program. Often a script first contains a set of function definitions and then has the main program that might call the functions. .

answered Dec 16, 2020 by Roshni
• 10,440 points
0 votes

To create a module just save the code you want in a file with the file extension .py :

  1. Save this code in a file named mymodule.py. ...
  2. Import the module named mymodule, and call the greeting function: ...
  3. Save this code in the file mymodule.py. ...
  4. Import the module named mymodule, and access the person1 dictionary:

answered Dec 16, 2020 by Gitika
• 65,870 points

Related Questions In Python

0 votes
4 answers

What is a Tuple in Python and how to use it?


answered Jun 21, 2020 in Python by sahil
• 540 points
0 votes
1 answer



answered May 27, 2019 in Python by Olly
0 votes
1 answer

How Do You Run A Python Script In Blender?


answered Jul 30, 2019 in Python by Mohammad
• 3,230 points
0 votes
1 answer



answered Aug 14, 2019 in Python by anonymous
+1 vote
1 answer


xrange only stores the range params and ...READ MORE

answered Aug 22, 2018 in Python by Priyaj
• 58,120 points
+2 votes
1 answer

How do you make a block comment in python?


answered Aug 23, 2018 in Python by Priyaj
• 58,120 points
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?


answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,077 views
0 votes
0 answers