python - How to make document names to be clickable hyperlinks? -
this question has answer here:
- hyperlink in tkinter text widget? 2 answers
i writing search engine indexes collection of files on hard drive. have script takes query query = raw_input()
, outputs set of file names.
i want file names clickable hyperlinks open file when user clicks on them.
how do this? interface (if requires interface) search box , output box.
this appears possible in matlab
.
also, if there's ide allows this, acceptable (but not preferable).
import webbrowser ... self.entryfield = entry(self.frame) ... mybutton = button(self.frame, text="open site", command= lambda: webbrowser.open(self.entryfield.get()))
if user enters http://www.stackoverflow.com
self.entryfield
, clicks mybutton
, it'll open browser , go so.
see webbrowser
.
Comments
Post a Comment