arnav
arnav

Reputation: 49

How to make cmd commands using python

Is there any way to make a custom cmd command using python? So when I type this in command prompt-

Microsoft Windows [Version 10.0.19041.867]
(c) 2020 Microsoft Corporation. All rights reserved.

C:/Users/User123>command1

I can make the prompt show "Hello World!" like this-

Microsoft Windows [Version 10.0.19041.867]
(c) 2020 Microsoft Corporation. All rights reserved.

C:/Users/User123>command1

C:/Users/User123>Hello World!

Upvotes: 0

Views: 111

Answers (1)

Vipin Chaudhary
Vipin Chaudhary

Reputation: 444

I Think you can do it by, declaring a variable in your environment. and set your python script to that variable.

Upvotes: 1

Related Questions