Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def set_steps(self, stepsarray): #INSERTS transaction start time to Evidence Step:{"sold/bought":"","step_amount":"","exec_Date":"","Stock":"","pair":"","price":""}
- for i in range(0,len(stepsarray)):
- print(len(stepsarray))
- print(list(dict(stepsarray[i]).keys()))
- for j in range(0,len(list(dict(stepsarray[i]).keys()))):
- print(list(dict(stepsarray[i]).keys())[j])
- if str(list(dict(stepsarray[i]).keys())[j])=='sold/bought'or'step_amount'or'exec_date'or'Stock'or'pair'or'price':
- print(list(dict(stepsarray[i]).keys())[j],"Equals 'sold/bought'or'step_amount'or'exec_date'or'Stock'or'pair'or'price'")
- self.new_index['Steps'] = stepsarray
- self.save_data()
- else:
- print("Wrong argument dict_list syntax")
- raise SyntaxError("StepDictionary")
- a=Evidence()
- a.set_steps([{'krowa':'sold','step_amount':'1500','exec_date':'09/10/2017','Stock':'Forex','pair':'EURPLN','price':'4.24'},{'sold/bought':'sold','step_amount':'1500','exec_date':'09/10/2017','Stock':'Forex','pair':'EURPLN','price':'4.24'}])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement