Skip to content
Snippets Groups Projects
Commit 2c2f941f authored by Mikhail Smirnov's avatar Mikhail Smirnov
Browse files

Update get_file.py

parent 2d370884
Branches 1-addition-to-readme
Tags v3.2.3
1 merge request!3Path to fits files
Pipeline #27807 passed with warnings
......@@ -5,15 +5,14 @@ from os import listdir
from os.path import isfile, join, dirname
def list_of_files():
# print(__file__)
'''return list of fits files'''
mypath = dirname(__file__) + "/data"
# print(mypath)
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
return onlyfiles
# print(onlyfiles)
def path_to(file_name: str):
'''return path to the chosen file'''
current_path = dirname(__file__) + f"/data/{file_name}"
return current_path
\ No newline at end of file
return current_path
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment