DEV Community

Cover image for Run Command on Terminal using #Python๐Ÿ
Developer
Developer

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
 
unseenumair profile image
Developer

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