Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Check if curl or wget commands exsit on your computer
- if sys.version_info >= (3,0):
- status_curl, result = subprocess.getstatusoutput('which curl')
- status_wget, result = subprocess.getstatusoutput('which wget')
- else:
- status_curl, result = commands.getstatusoutput("which curl")
- status_wget, result = commands.getstatusoutput("which wget")
- if status_curl == 0:
- cmd='curl -g "'+cmd+'" -o '+ ncout
- elif status_wget == 0:
- cmd='wget "'+cmd+'" -O '+ ncout
- else:
- sys.exit('nThe script will need curl or wget on the system, please install them first before running the script !nProgram will exit now !n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement