Skip to content

Instantly share code, notes, and snippets.

@Axel-Erfurt
Created September 23, 2018 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Axel-Erfurt/4fc70d708e4e17bcdc8c3e8b47a11754 to your computer and use it in GitHub Desktop.
Save Axel-Erfurt/4fc70d708e4e17bcdc8c3e8b47a11754 to your computer and use it in GitHub Desktop.
Linux User Folders (python)
from gi.repository import GLib
docs = GLib.get_user_special_dir(GLib.USER_DIRECTORY_DOCUMENTS)
desktop = GLib.get_user_special_dir(GLib.USER_DIRECTORY_DESKTOP)
pics = GLib.get_user_special_dir(GLib.USER_DIRECTORY_PICTURES)
videos = GLib.get_user_special_dir(GLib.USER_DIRECTORY_VIDEOS)
music = GLib.get_user_special_dir(GLib.USER_DIRECTORY_MUSIC)
downloads = GLib.get_user_special_dir(GLib.USER_DIRECTORY_DOWNLOAD)
public = GLib.get_user_special_dir(GLib.USER_DIRECTORY_PUBLIC_SHARE)
templates = GLib.get_user_special_dir(GLib.USER_DIRECTORY_TEMPLATES)
print(docs)
print(desktop)
print(pics)
print(videos)
print(music)
print(downloads)
print(public)
print(templates)
@Axel-Erfurt
Copy link
Author

get the translated Names for Linux User Folders in python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment