I am new to python. I wrote a program that you can execute by typing python Filecount.py ${argument}Why do I see that my teacher can run the program only by typing Filecount.py ${argument}. How to achieve this?
python Filecount.py ${argument}
Filecount.py ${argument}
Make it executable
chmod +x Filecount.py
and add hashbang to the beginning Filecount.py, which lets os know that you want to use the python interpreter to execute the file.
Filecount.py
#!/usr/bin/env python
Then run it like
./Filecount.py args
on a Linux-based OS, you should include a line (at the beginning of your script, i.e. the first line), for example:
#!/usr/bin/python
, python . script.
, script (.. ) .
Add a shebang line to the top of the file: http://en.wikipedia.org/wiki/Shebang_(Unix)#Purpose
It will tell the system which executable file will be used when starting your program.
For example, add
as the first line, and then change the file permissions to execute it.
Good luck
Source: https://habr.com/ru/post/1533365/More articles:static pointer in C ++ inheritance - c ++What are the possible values for the status of the action of the Commission Junction - commission-junctionQuick access to the matrix - c ++Several associations in Sails.js - javascriptUITextField secureEntry moves cursor - iosHow can I resolve the error when I try to run an instance on Amazon RDS? - sql-serverApp_Code folder for dll in vs2013 - c #How to protect SQL database from domain administrators? - securityIs there a way to do nested generation statements in Verilog? - verilogDjangoAll Articles