How to call Python module from command line?

PythonServer Side ProgrammingProgramming

If we are writing a Python script that is to be used as a module, we can test this module by adding this call of the function to the bottom:

def fubar():
    #does something useful
fubar()

and run it  at the command prompt like this:

~$ python fubar.py
raja
Updated on 26-Sep-2019 19:04:57

Advertisements