Message257849
In [108]: os.mkdir('newdir') # make new dir
In [140]: p = os.path.abspath('newdir')
In [141]: p
Out[141]: '/media/sagarkar10/sdrive/programing/python/SciPy/scipy-notebook/newdir'
## here 'newdir' is also a directory with a file inside
In [143]: os.path.dirname(p)
Out[143]: '/media/sagarkar10/sdrive/programing/python/SciPy/scipy-notebook'
## but os.path.dirname() dont show it under directory it treats as if its a file and till the last '/' is the directory
and also
In [145]: os.path.basename(p)
Out[145]: 'newdir'
## basename shows it |
|
Date |
User |
Action |
Args |
2016-01-09 18:25:26 | sagarkar10 | set | recipients:
+ sagarkar10 |
2016-01-09 18:25:26 | sagarkar10 | set | messageid: <1452363926.86.0.702790160127.issue26064@psf.upfronthosting.co.za> |
2016-01-09 18:25:26 | sagarkar10 | link | issue26064 messages |
2016-01-09 18:25:26 | sagarkar10 | create | |
|