How do we make python scripts executable?



How do we make python scripts executable?..

Answer / chaitanya

Python scripts can be executed in two ways:

Suppose I want to execute script1.py

We can open the script1.py in IDE editor & run the script in the frontmost window of the python IDE by hitting the run all button.

Second way is using command prompt by making sure PATH is set appropriately directly type script name else type

>>>python script1.py

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What are methods in python?

0 Answers  


What is overloading in python?

0 Answers  


Write program to find the common elements from two sets?

0 Answers  


Explain how can you access a module written in python from c?

0 Answers  


How to do relative imports in python?

0 Answers  






Which is the default function in a class?

0 Answers  


Different file processing modes supported by python?

0 Answers  


What is tuple unpacking?

0 Answers  


What are the benefits of using python? What do you understand of pep 8?

0 Answers  


How to iterate through two lists in parallel?

0 Answers  


What is a dataframe in python?

0 Answers  


Can you explain the life cycle of a thread?

0 Answers  


Categories