-
Notifications
You must be signed in to change notification settings - Fork 0
/
relative path finder.py
26 lines (21 loc) · 1.09 KB
/
relative path finder.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import os.path;
print("""__________ .__ __ .__
\______ \ ____ | | _____ _/ |_|__|__ __ ____
| _// __ \| | \__ \\ __\ \ \/ // __ \
| | \ ___/| |__/ __ \| | | |\ /\ ___/
|____|_ /\___ >____(____ /__| |__| \_/ \___ >
\/ \/ \/ \/
__________ __ .__ ___________.__ .___
\______ \_____ _/ |_| |__ \_ _____/|__| ____ __| _/___________
| ___/\__ \\ __\ | \ | __) | |/ \ / __ |/ __ \_ __ \
| | / __ \| | | \ | \ | | | \/ /_/ \ ___/| | \/
|____| (____ /__| |___| / \___ / |__|___| /\____ |\___ >__|
\/ \/ \/ \/ \/ \/ """);
print("By Danny Kendall\n\n\n");
path1 = raw_input("What is your first path? \n");
path2 = raw_input("What is your second path? \n ");
try:
result = os.path.relpath(path1, path2);
print ("Your relative path is: \n " + result)
except ValueError:
print ("There is no shortcut for this path. Use: \n" + path2);