Hi dears.
I am playing windows commands with python scripts.
for example I did:

import os
print os.system("ipconfig -a")

but there is a problem with some commands.for example see this:


after playing the first one script, I have to come back to shell and play second one and ...
but how can I do it and also how can I do it in linux?

Can you explain better or give some code?

sorry I can not write eng well.
we can play command line's commands in python.
for example in cmd you can play "cls" to clear command line.
and in python we do it like below code:

import os

it will play well.but some of commands are that you have to return again to command line and play a new command.

for example:


manualy at first you have to type nslookup.then you have to wait.you will see second line that apear like below:


after you have to enter another command.for example:


now I can not play such instructions.I have to return to command line again and play second command.but python will wait for command line.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.