mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-26 09:05:50 +00:00
28 lines
436 B
Python
28 lines
436 B
Python
# -*- coding: utf-8 -*-
|
|
'''
|
|
vdirsyncer.utils
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
:copyright: (c) 2014 Markus Unterwaditzer
|
|
:license: MIT, see LICENSE for more details.
|
|
'''
|
|
|
|
import os
|
|
|
|
|
|
def expand_path(p):
|
|
p = os.path.expanduser(p)
|
|
p = os.path.abspath(p)
|
|
return p
|
|
|
|
|
|
def split_dict(d, f):
|
|
a = {}
|
|
b = {}
|
|
for k, v in d.items():
|
|
if f(k):
|
|
a[k] = v
|
|
else:
|
|
b[k] = v
|
|
|
|
return a, b
|