ed8f865341
This reverts commit 3eadf3a216
because build failed
Change-Id: Id9efa22f3e1167e1b1bb235b449aef60256c0e24
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
#!/usr/bin/python3
|
|
|
|
# import orderedDict
|
|
import json
|
|
|
|
class AMD_SMI_Logger(object):
|
|
def __init__(self) -> None:
|
|
# self.card = {}
|
|
# backwards compatability
|
|
pass
|
|
|
|
def store_output(self, target_device, log):
|
|
pass
|
|
|
|
def print_output(self, format=''):
|
|
# JSON, CSV, text
|
|
# split into 3 different formats
|
|
# for elem in self.cards:
|
|
# print pretty
|
|
pass
|
|
|
|
def print_json(self):
|
|
# json_data = '[{"ID":10,"Name":"Pankaj","Role":"CEO"},' \
|
|
# '{"ID":20,"Name":"David Lee","Role":"Editor"}]'
|
|
|
|
# json_object = json.loads(json_data)
|
|
|
|
# json_formatted_str = json.dumps(json_object, indent=2)
|
|
|
|
# print(json_formatted_str)
|
|
pass
|
|
|
|
def print_csv(self):
|
|
# # Opening JSON file and loading the data
|
|
# # into the variable data
|
|
# with open('data.json') as json_file:
|
|
# data = json.load(json_file)
|
|
|
|
# employee_data = data['emp_details']
|
|
|
|
# # now we will open a file for writing
|
|
# data_file = open('data_file.csv', 'w')
|
|
|
|
# # create the csv writer object
|
|
# csv_writer = csv.writer(data_file)
|
|
pass |