Skip to content

Instantly share code, notes, and snippets.

@prongs
Created June 22, 2015 08:27
Show Gist options
  • Save prongs/a74b456e27547127efcb to your computer and use it in GitHub Desktop.
Save prongs/a74b456e27547127efcb to your computer and use it in GitHub Desktop.
def f(a):
if a is full file path:
return a
elif a is a full directory path:
ret = []
for line in readfile(a+orderfile):
if line starts with "/" or has ":/":
ret += f(line)
else: # relative path
ret += f(a+"/"+line)
elif a is regex:
ret = []
for b in glob(a):
ret += f(a)
return ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment