DEV Community

Cover image for Run Command on Terminal using #Python🐍
Umair Shakoor 😈
Umair Shakoor 😈

Posted on

Run Command on Terminal using #Python🐍

import os
os.system('whoami')
Enter fullscreen mode Exit fullscreen mode

Description :

Simple program of two lines of python to run any command directly in terminal . I always thinking how we can install an external module like PyJokes in others PC when sharing code . Therefore, to automate

pip install pyjokes
Enter fullscreen mode Exit fullscreen mode

I have searched and build this.

What you think about this program ?
Your suggestions will be appreciated πŸ’―

Top comments (1)

Collapse
 
cyberumair profile image
Umair Shakoor 😈

Replace 'whoami' inside os.system() with the #command you want to run it directly in #terminal using #python.