Skip to content

Commit

Permalink
example for #21 and #17
Browse files Browse the repository at this point in the history
  • Loading branch information
epogrebnyak committed Mar 17, 2024
1 parent e10a2c6 commit 432908a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
12 changes: 12 additions & 0 deletions sandbox/canonical_path.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import os

def canonical(path):
fs = [os.path.expandvars, os.path.expanduser, os.path.normcase]
for f in fs:
path = f(path)
return path


print(os.path.exists("~")) # False
print(os.path.exists(os.path.abspath("~"))) # False
print(os.path.exists(canonical("~"))) # True
10 changes: 0 additions & 10 deletions sandbox/example.py

This file was deleted.

6 changes: 0 additions & 6 deletions sandbox/seen.py

This file was deleted.

0 comments on commit 432908a

Please sign in to comment.