29 lines
650 B
Python
29 lines
650 B
Python
from Config import *
|
|||
|
|
import sys
|
||
|
|
import datetime
|
||
|
|
from FlowerServices import Flower,SuperFlower
|
||
|
|
from AccessControl import Access
|
||
|
|
|
||
|
|
file1 = open('pins.csv', 'r')
|
||
|
|
Lines = file1.readlines()
|
||
|
|
|
||
|
|
newuser = 'janine'
|
||
|
|
newhush = 'demaat196'
|
||
|
|
|
||
|
|
# create user in the db.
|
||
|
|
f = SuperFlower(newuser, newhush)
|
||
|
|
if f.createNewTable():
|
||
|
|
# login as new user
|
||
|
|
u = Flower(newuser, newhush)
|
||
|
|
|
||
|
|
count = 0
|
||
|
|
# Strips the newline character
|
||
|
|
for line in Lines:
|
||
|
|
count += 1
|
||
|
|
line=line.strip()
|
||
|
|
print(line)
|
||
|
|
(org, date, id, name, pwd) = line.split('","',5)
|
||
|
|
org = org[1:]
|
||
|
|
pwd = pwd[:-2]
|
||
|
|
u.add(org, name, id, pwd, 0, date)
|