In 269 os path dirname foo Out 269 In 270 os path dirname huj foo Out

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
In [269]: os.path.dirname('foo')
Out[269]: ''
In [270]: os.path.dirname('/huj/foo')
Out[270]: '/huj'
In [271]: os.path.abspath('foo')
Out[271]: '/home/mishok/foo'
In [272]: os.path.dirname(os.path.abspath('foo'))
Out[272]: '/home/mishok'