External command in Python

0 votes
Is it possible to call an external command from within a python script?
Oct 1, 2018 in Python by ana1504.k
• 7,550 points

retagged Oct 1, 2018 by ana1504.k 13 views

1 answer to this question.

0 votes

you can check the subprocess module in the standard library :

The subprocess  is more flexible when compared to system and it is recommended over the os.system().

answered Oct 1, 2018 by SDeb
• 12,520 points

Related Questions In Python

0 votes
2 answers

Calling an external command in Python

import os os.system('external_command') Replace external_command in the above code ...READ MORE

answered Oct 16, 2018 in Python by Omkar
• 67,140 points
33 views
0 votes
1 answer

Call a shell command in Python?

Try this - os.system("commands and arguments") READ MORE

answered Jun 21, 2018 in Python by Hamartia's Mask
• 1,580 points
21 views
0 votes
1 answer

'python' is not recognized as an internal or external command

I have met same issue when I ...READ MORE

answered Aug 24, 2018 in Python by Priyaj
• 56,160 points
87 views
0 votes
1 answer
0 votes
1 answer

Restart python script automatically even when it crashes in Linux

Maybe this would be more robust? 1) save ...READ MORE

answered Sep 11, 2018 in Python by Priyaj
• 56,160 points
62 views
0 votes
1 answer

Restart python script automatically even when it crashes in Linux

Maybe this would be more robust? 1) save ...READ MORE

answered Sep 21, 2018 in Python by Priyaj
• 56,160 points
138 views
0 votes
1 answer
+1 vote
2 answers

Execute Pig Script from Grunt Shell

From your current directory run  pig -x local Then ...READ MORE

answered Oct 25, 2018 in Big Data Hadoop by Kunal
624 views
0 votes
1 answer

Command history in interactive Python

You can use the following to get ...READ MORE

answered Nov 27, 2018 in Python by SDeb
• 12,520 points
84 views
0 votes
1 answer

Indentation of Python in Notepad++

To indent the block, select the entire ...READ MORE

answered Sep 18, 2018 in Python by SDeb
• 12,520 points
168 views