<commit_before>import random

import efl.elementary as elm
elm.init()
from efl.elementary.window import StandardWindow
from efl.elementary.label import Label
from efl.elementary.button import Button
from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL

from elmextensions import FileSelector

EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND
FILL_BOTH = EVAS_HINT_FILL, EVAS_HINT_FILL

class MainWindow(object):
    def __init__( self ):
        win = StandardWindow("Testing", "Elementary File Selector")
        win.callback_delete_request_add(lambda o: elm.exit())

        fs = FileSelector(win, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
        #fs.setMode("Open")
        fs.show()
        
        fs.callback_activated_add(self.showFile)
        fs.callback_cancel_add(self.qExit)
        
        win.resize_object_add(fs)

        win.resize(600, 400)
        win.show()
        
    def qExit(self, fs):
        elm.exit()
        
    def showFile(self, ourFile):
        print(ourFile)
<commit_msg>Fixed the showfile callback in the fileselector example<commit_after>import random

import efl.elementary as elm
elm.init()
from efl.elementary.window import StandardWindow
from efl.elementary.label import Label
from efl.elementary.button import Button
from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL

from elmextensions import FileSelector

EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND
FILL_BOTH = EVAS_HINT_FILL, EVAS_HINT_FILL

class MainWindow(object):
    def __init__( self ):
        win = StandardWindow("Testing", "Elementary File Selector")
        win.callback_delete_request_add(lambda o: elm.exit())

        fs = FileSelector(win, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
        #fs.setMode("Open")
        fs.show()
        
        fs.callback_activated_add(self.showFile)
        fs.callback_cancel_add(self.qExit)
        
        win.resize_object_add(fs)

        win.resize(600, 400)
        win.show()
        
    def qExit(self, fs):
        elm.exit()
        
    def showFile(self, fs, ourFile):
        print(ourFile)

{'fraction_non_alphanumeric': 0.08333333333333333, 'fraction_numerical': 0.005714285714285714, 'mean_word_length': 3.2444444444444445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5176796', 'n_tokens_mistral': 731, 'n_tokens_neox': 705, 'n_words': 142}