Opening command promt

please tell me how to code in such a way that it opens command prompt automatically and do a function in it and finally prints the result of that function as spreadsheet .

Hello Anurag, Yeah I think you want to automate this stuff, so yes you can make some scripts either in python using selenium or best thing is that you can directly write into spreadsheet. No need of opening the terminal in between. So just you use import openpyxl this is a package through which you can directly write into excel. So what exactly you need to do is that use this library then write your python functions or the operations and after that put your results into the spreadsheet.
I hope it is clear to you. In case it is clear to you pls mark it as resolve and provide the rating as well as feedback so that we can improve ourselves.
In case there is still some confusion pls let me know, I will surely try to help you out.
Thanks :slight_smile:
Happy Coding !!

okay please tell me that . i want to do stuff like .i had given a ping command in command promt i.e ping www.google.com and i want its output in separate file . and wants to do this stuff with python . like i have given 10 links say www.google.com , www.facebook.com ,www.yahoo.com , www. youtube.com and likewise 10 links so i want to run all automatically in command promt and show the output in a separate file (spreadsheet preferably). please tell me the code for the same

It won’t be that much easy to open the command prompt and then run a function or a command. Rather than that try if it is possible only using python so that we don’t need to run the functions or the stuff but for that you need to run the python function from the command prompt manually and it will handle the rest of the stuff.
Although you can create a python function for this
pls refer this : https://stackoverflow.com/questions/2953462/pinging-servers-in-python

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.