Skip to content

Instantly share code, notes, and snippets.

@jrabbit
jrabbit / directory.py
Created April 6, 2012 14:52
Make an app folder/ get app folder
def directory(app_name):
"""Construct app_dir from os name"""
home = os.path.expanduser('~')
if platform.system() == 'Linux':
app_dir = os.path.join(home, '.' + app_name)
elif platform.system() == 'Darwin':
app_dir = os.path.join(home, 'Library', 'Application Support',
app_name)
elif platform.system() == 'Windows':
app_dir = os.path.join(os.environ['appdata'], app_name)
@davidnunez
davidnunez / gist:1404789
Created November 29, 2011 13:20
list all installed packages in android adb shell
pm list packages -f