.txt or plain text files without extension are supported.
- Posts
- 3
- Comments
- 12
- Joined
- 3 yr. ago
- Posts
- 3
- Comments
- 12
- Joined
- 3 yr. ago
KDE @lemmy.kde.social Hi, I have released a new version of Quick view with many improvements and more file types supported.
KDE @lemmy.kde.social Hi, I have released a program similar to Apple's Quick Look.
Ask Lemmy @lemmy.world For those who were skeptics about the fediverse: what made you change your mind?


To get the size of archives and folders:
os.stat(filename).st_size# for folders you have to use it together with os.walk()To get the list of files inside an archive I use the zipfile, rarfile and tarfile modules.For the file type, I either extract the extension from the name or I use a bash command via subprocess:
file --mime-type filepathsubprocess is used if there is no extension (as often happens with text files).I preferred to use subprocess to avoid having to increase the number of dependencies needed.