4grab/util.py
ryuslash af529bcd4e Not checking and kirbybase
Using kirbybase to store downloaded images
A nasty bug that always returned the wrong result when checking whether an image had already been downloaded has been fixed
2010-04-19 09:16:04 +02:00

13 lines
318 B
Python

import os
import sys
homedir = os.getenv("HOME")
if homedir is None:
homedir = os.path.dirname(sys.argv[0])
confdir = os.path.join(homedir, ".4grab")
def raw_input_with_default(default, prompt):
inp = raw_input("%s (default=%s): " % (prompt, default))
if inp == "":
return default
return inp