smpl_io.io.find_file¶
- smpl_io.io.find_file(fname, up=0)[source]¶
Searches for
fnamein all down folders or up folder to given order respectively.Parameters¶
- fnamestr
file name.
- upint
number of up folders to search.
Returns¶
- str
path to the file.
Examples¶
>>> import os >>> find_file("io.py",0) 'smpl_io/io.py' >>> os.chdir("smpl_io") >>> find_file("io.py",0) 'io.py' >>> find_file("Makefile",1) '../Makefile'