How to python script executable on unix?



How to python script executable on unix?..

Answer / Mudassar Hasan

To make a Python script executable on Unix, you need to give it the correct permissions and rename it with a .py extension followed by .exe (or just .py). Here's an example: chmod +x myscript.py && mv myscript.py myscript.py.exe

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What does the map() function do?

1 Answers  


Explain me what is the purpose of doc strings in python?

1 Answers  


How do you split a list into evenly sized chunks in python?

1 Answers  


Can you sort a string in python?

1 Answers  


How to install python and prepare environment?

1 Answers  


Why python is fast?

1 Answers  


Explain join() and split() in python.

1 Answers  


What is the method does join() in python belong?

1 Answers  


What is a variable in python?

1 Answers  


Is there a reverse function in python?

1 Answers  


What does defined by whitespace in python?

1 Answers  


Under what circumstances would von use a while statement rather than for?

1 Answers  


Categories