AllenDowney/AstronomicalData

Get file size with Python?

Opened this issue · 1 comments

zonca commented

I am undecided if this is better than ls -lh:

(os.path.getsize(filename) * u.byte).to(u.MB)

Has the advantage of being same for Windows and showing another use of astropy units, but maybe is too obscure?

Interesting idea. Let me think about it.