From 62d0aa159fc046a27bed47e337d787a08f4687d0 Mon Sep 17 00:00:00 2001 From: Sunaina Pai Date: Sat, 17 Mar 2018 14:45:21 +0530 Subject: Add makesite: A simple static site generator --- test/path.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/path.py (limited to 'test/path.py') diff --git a/test/path.py b/test/path.py new file mode 100644 index 0000000..38c0991 --- /dev/null +++ b/test/path.py @@ -0,0 +1,16 @@ +import os +import tempfile +import shutil + + +def temppath(*paths): + return os.path.join(tempfile.gettempdir(), *paths) + + +def move(src, dst): + if os.path.isfile(dst): + os.remove(dst) + elif os.path.isdir(dst): + shutil.rmtree(dst) + if os.path.exists(src): + os.rename(src, dst) -- cgit v1.2.3