0

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!

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

I don't understand, could you give a code example please?
Are you looking into converting your .py file to an executable file? In that case, you can use pyinstaller: pip install pyinstaller and for further information refer to the sources of the module: datatofish.com/executable-pyinstaller

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.