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 is pip install?

0 Answers  


Explain the difference between a list and the tuple?

0 Answers  


How do I sort a dictionary by value?

0 Answers  


What is the best flask or Django

0 Answers  


How to use *args and **kwargs in python?

0 Answers  






Tell us what is python?

0 Answers  


How does the python version numbering scheme work?

0 Answers  


Write a program structure in python?

0 Answers  


How do you append to a file?

0 Answers  


What is used to create Unicode string in Python?

1 Answers  


What are the two modes of python?

0 Answers  


How much bytes do integer and decimal data types hold in python?

0 Answers  


Categories