af529bcd4e
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
13 lines
318 B
Python
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
|