Python Forum
Run commands from Text file
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Run commands from Text file
#1
Hi All,

I have few Firewall commands stored in text file.. I has around 150 Commands, how to execute those commands in python??

Regards,
Bharath
Reply
#2
You can run system commands via the subprocess module
https://docs.python.org/2/library/subprocess.html
Recommended Tutorials:
Reply
#3
Thank you that is nice to know Metulburr
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020