# HG changeset patch # User Jeff Hammel # Date 1292395616 28800 # Node ID ac44c36da885c11d84042beb893ddd0c9043c203 # Parent 044ac9e0b29ce1a42915e0c74537c4a445840dae make include example work diff -r 044ac9e0b29c -r ac44c36da885 examples/include-example.txt --- a/examples/include-example.txt Mon Dec 13 21:03:39 2010 -0800 +++ b/examples/include-example.txt Tue Dec 14 22:46:56 2010 -0800 @@ -2,4 +2,4 @@ I am including a file: -{{include(example.txt)}} +{{include(here + 'example.txt')}} diff -r 044ac9e0b29c -r ac44c36da885 makeitso/makeitso.py --- a/makeitso/makeitso.py Mon Dec 13 21:03:39 2010 -0800 +++ b/makeitso/makeitso.py Tue Dec 14 22:46:56 2010 -0800 @@ -81,8 +81,11 @@ def base_uri(uri): if '://' in uri: - return 'uri'.rsplit('/', 1)[0] - return os.path.dirname(os.path.abspath('me')) + return 'uri'.rsplit('/', 1)[0] + '/' + else: + here = os.path.dirname(os.path.abspath('me')) + here = here.rstrip(os.path.sep) + os.path.sep + return here def include(uri): f, headers = urllib.urlretrieve(uri)