Skip to content

Instantly share code, notes, and snippets.

@shivanandmn
Created May 24, 2021 13:05
Show Gist options
  • Save shivanandmn/c97ae8ad34acaf6229301576160b9455 to your computer and use it in GitHub Desktop.
Save shivanandmn/c97ae8ad34acaf6229301576160b9455 to your computer and use it in GitHub Desktop.
Open URL directly in browser from python code.
import webbrowser
import pandas as pd
df = pd.read_csv("sub.csv")
for i in df["files"].values.tolist():
urls = "http://127.0.0.1:5000/question/"+str(i[:-3])
#opens url in default browser, you can also use open_tab()
webbrowser.get().open(url=urls)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment