Skip to content

Instantly share code, notes, and snippets.

View gh-osh's full-sized avatar
🦖

soumya/b/ghosh gh-osh

🦖
View GitHub Profile
@gh-osh
gh-osh / open file dialog
Last active March 4, 2020 16:29 — forked from den-run-ai/open file dialog
Open file dialog for default ipython notebook in Anaconda
def openfile_dialog():
from PyQt5 import QtGui
from PyQt5 import QtGui, QtWidgets
app = QtWidgets.QApplication([dir])
fname,_filter = QtWidgets.QFileDialog.getOpenFileName(None, "Select a file...", '.', filter="All files (*)")
return str(fname)