When you write scripts, often times, you'll see the following line at the top:
#!/usr/bin/python
Now what is this?
This line allows you to run your script as the executable, without invoking the interpreter. For example, if I write a python script called blabla.py, I will need to run it this way:
%> python blabla.py
change the permission and add the shebang line, will allow you to run it this way:
%> chmod +x blabla.py
%> ./blabla.py
if you want to run it in the background, then call the no hangup:
%> nohup ./blabla.py
It will run itself doing its thing. Time to go to sleep while waiting for it to finish.
A place to breathe
Monday, February 20, 2017
Subscribe to:
Post Comments (Atom)
About Me
- syamsulhasran
- I'm currently a software engineer. My specific interest is games and networking. I'm running software company called Nusantara Software.
No comments:
Post a Comment