2.7.2 Building CLI Applications
Python Programming
In this section, we explore CLI (Command-Line Interface) applications. These applications allow users to interact with a program through text commands in a terminal or command prompt. CLI applications can be developed using various programming languages, including Python. All the applications we develop in this chapter are, in fact, CLI applications. We can run each of them using the command line. So, let's run the application we created in section 2.7.1 using the command line. To run this application on command line interface we need to follow following steps.
- Save the main. py and greetings. py files in the same directory.
- Open your terminal or command prompt, navigate to the directory, and ran: python main.py.
- You should see the output: As-Salaam-Alaikum, everyone!