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
• 5,950 points

retagged Oct 1, 2018 by ana1504.k 7 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 9,460 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
• 65,840 points
27 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
16 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,120 points
60 views
+3 votes
7 answers

How can I rename a file in Python?

yes, you can use "os.rename" for that. ...READ MORE

answered Mar 31, 2018 in Python by DareDev
• 6,520 points
54 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 11, 2018 in Python by Priyaj
• 56,120 points
54 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,120 points
88 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
460 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
• 9,460 points
46 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
• 9,460 points
96 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.