how to get the parent dir location using python..
- by zjm1126
this code is get the templates/blog1/page.html in b.py:
path = os.path.join(os.path.dirname(__file__), os.path.join('templates', 'blog1/page.html'))
but i want to get the parent dir location:
a
|---b.py
|---templates
|--------blog1
|-------page.html
and how to get the a location
thanks