sys.argv is a list which contains the command-line arguments passed to script
import sys
if __name__=="__main__":
print("Arguments are: ",sys.argv)
print("Length: ",len(sys.argv))
print("First argument is script name: ",sys.argv[0])
$ python reading-arguments.py
Arguments are: ['reading-arguments.py']
Length: 1
First argument is script name: reading-arguments.py
$ python reading-arguments.py argument1
Arguments are: ['reading-arguments.py', 'argument1']
Length: 2
First argument is script name: reading-arguments.py
Python has http server module . The module can be executed and it by default it binds to 8000 on all the Ethernet interfaces.
This will expose current working directory