Reputation: 31
I'm currently trying to code a meme generator, and in this I want to load picture memes, have them be open for 10 seconds and then terminate the program (in this case I'm using Internet Explorer). This is how my code looks currently:
import webbrowser
import time
import subprocess
memeURL = "https://image.ibb.co/m9vxqQ/oh_no.jpg"
def open_program(path_name):
return subprocess.Popen(path_name)
def close_program(p):
p.terminate()
p = open_program("C:\Program Files\Internet Explorer\iexplore.exe")
time.sleep(10)
close_program(p)
I was wondering if there would be anyway if instead of loading just iexplore.exe, it could load with a url (in this case it would be the variable memeURL). Thanks in advance :)
Upvotes: 0
Views: 288