Skip to content

Instantly share code, notes, and snippets.

@mstankie
mstankie / JupyterFileSelector.py
Last active June 2, 2017 11:18 — forked from tritemio/open file dialog
Open file dialog for default ipython notebook in Anaconda
def selectFile(startDir = '.', filter = "All files (*)", title = "Select a file..."):
from PyQt4 import QtGui
app = QtGui.QApplication([dir])
fname = QtGui.QFileDialog.getOpenFileName(None, title, startDir, filter=filter)
return str(fname)