DataMedSci / pymchelper

Python toolkit for SHIELD-HIT12A and FLUKA
http://datamedsci.github.io/pymchelper/
15 stars 7 forks source link

Add support for pathlib in `readers` #577

Open p1003 opened 1 year ago

p1003 commented 1 year ago
path = Path("some/path")
fromfile(path)

Code above causes file_has_sh_magic_number function from pymchelper/readers/shieldhit/general.py to throw error below. image

It is desired to work as fine as it works with code below:

path = Path("some/path")
fromfile(str(path))