-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
25 lines (25 loc) · 999 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import os
from os import path
def cls():
os.system('cls' if os.name=='nt' else 'clear')
def makedir():
try:
os.system('mkdir bin\\books bin\\users bin\\accounts' if os.name=='nt' else 'mkdir bin\\books bin\\users bin\\accounts')
open('bin\\users\\user-info.txt','a').close()
open('bin\\books\\book-info.txt','a').close()
open('bin\\books\\reserved_book.txt','a').close()
open('bin\\books\\returned_book.txt','a').close()
open('bin\\books\\borrowed_book.txt','a').close()
open('bin\\accounts\\fine.txt','a').close()
open('bin\\credential.txt','a').close()
if path.exists('bin\\config.txt'):
pass
else:
with open('bin\\config.txt','a') as f:
f.write('USERID-USID10000\n')
f.write('BOOKID-BKID10000\n')
f.write('BOROID-BRID10000\n')
f.write('RESVID-RSID10000\n')
cls()
finally:
pass