Hi I know this is a pretty basic design question. But I don't realy get it....
I write it in Python with PySide, but I think this is more a language unrelated question.
A simplified example what I want to do:
I Have a Gui with a button that opens a file dialog. 
In this one I choose a folder.
The code scans the suffixes of the files in the folder and returns the 3 needed one. lets say .mp3, .txt and .mov and shows them in the gui.
To this point the seperation should be no problem I would have a Gui class that runs the code of the core class, gets the three files as return values and sets up the gui.
What I am wondering about is what happens when there are more then one files matching the .mp3 suffix. I would want to have a pop up with a combobox to select the one I want to use. But I don't realy get how to implement it without adding gui code to the core class.
Well maybe have the function in the Core module return some specifier that such a thing has happened (found multiple) along with the given names, then display the choice to the user and call a function in the Core module that returns relevant information about that file.
Bear in mind you do not have to be dogmatic regarding such restrictions, there are some situations where having code in the GUI is much less of a hassle than having to integrate some way of it to work in between modules.
This is where you make a decision how to go about writing the code, bearing in mind how important this feature is to you, how testable/maintainable you need it to be.
clean divide Code and Gui