the difference between os.mkdir() and os.makedirs()
<p>I use python 2.7 to create a spider in Pycharm to get data from website.
In the first spider I create a spider in the project folder and use os.mkdir('home/img/') to create a folder to save data. There is no error.
In the second spider I create the spider with RedisQueue which is in the project folder and put the Spider.py into /usr/lib/python2.7. when I use os.mkdir('home/img/') it reports the error 'no such file or dir' and I change it to os.makedirs() which works. 
May I know why the 1st one doesn't meet error? Thanks in advance</p>