AstronomicalData icon indicating copy to clipboard operation
AstronomicalData copied to clipboard

Get file size with Python?

Open zonca opened this issue 4 years ago • 1 comments

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?

zonca avatar Nov 19 '20 19:11 zonca

Interesting idea. Let me think about it.

AllenDowney avatar Nov 19 '20 19:11 AllenDowney