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 |
How do you handle exceptions with try/except/finally in python?
How is Python used in web development?
What is the procedure to extract values from the object used in python?
What advantages does Python offer as a programming tool in today's environment?
What good is recursion?
What is self in oop of python?
What is pass in Python?
How to convert a number to a string?
Define a method in Python?
Mention what is the difference between Django, Pyramid, and Flask.
What is python namespace?
Differentiate between .py and .pyc files?