Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Broken Logic?
-
Not quite sure If I'm doing this right, as when I call the function, nothing gets printed.
def search_files(): dir_items = listdir(getcwd()) query = v['searchbox'].text if query in dir_items: print 'IT WORKED' else: print 'IT DID NOT WORK'
-
@techteej, probably your function gets interrupted somewhere. Add print statements after each line, like so:
def search_files(): print 'ENTERING FUNCTION' dir_items = listdir(getcwd()) # from os module? print 'GOT FILES' query = v['searchbox'].text print 'GOT SEARCH TEXT' if query in dir_items: print 'OH HEY IT WORKED' else: print 'IT DIDNT WORK'