Script to setup files and folders for the pos system.


In [2]:
import os
import getpass

In [3]:
getusr = getpass.getuser()

In [ ]:


In [4]:
homdurz = ('/home/' + getusr + '/sellcoffee')

In [5]:
homdurz


Out[5]:
'/home/wcmckee/sellcoffee'

In [9]:
prodz = (homdurz + '/products')

In [10]:
usrnam = (homdurz + '/usernames')

In [11]:
usrnam


Out[11]:
'/home/wcmckee/sellcoffee/usernames'

In [ ]:


In [6]:
os.mkdir(homdurz)


---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-6-86942e78ccfc> in <module>()
----> 1 os.mkdir(homdurz)

OSError: [Errno 17] File exists: '/home/wcmckee/sellcoffee'

In [8]:
os.mkdir(prodz)


---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-8-682e9b77045f> in <module>()
----> 1 os.mkdir(prodz)

OSError: [Errno 17] File exists: '/home/wcmckee/sellcoffee/products'

In [ ]:
os.mkdir(usrnam)