Surprisingly it took me quite a while to figure out how to to this, once again turned out to be pretty simple.
Here we go, first thing make sure Cocoa is imported
from Cocoa import *
second, define a method like this:
panel = NSOpenPanel.openPanel()
#… there are lots of options, you see where this is going…
if panel.runModal() == NSOKButton:
now you can call the dialog and store it’s return value like this:
file = openFile()
if you want to choose a directory instead of a file just use:
you can also return multiple files or filter for specific extension, I’m sure you’ll figure this out yourself.