dimanche 13 octobre 2019

Design of program in Python

I'm designing (as a hobby), a program to import a CSV file of a student timetable. Then match that timetable to pictures and generate a "Graphical Timetable" I.e a timetable showing pictures for each lesson, so a history lesson might have a picture of a knight. I've succesfully used Pandas to import the file and PysimpleGui to create a gui. I'm planning to create the timetable using Python Image Library to make a JPG.

My question is what is a sensible design route to "map" between Pandas and PIL and the GUI, I will want to write back to the PANDAS dataframe, (the picture filenames and other information taken from the GUI).

Should I create a object to hold each student data, or just work directly between Pandas/PIL/PysimpleGui. If so, what type of object?

Can you give me some guideance on the sensible way to go about this project.

My concern with working directly with Pandas through the GUI and PIL will be that it will be hard to keep track of the data locations to write back. So it might be easier to write an object.

if event == "About":
    about()
if event == "Match Classses":
    subject_gui()
if event =="Open Students File":
    importdata.load_from_saved_frame_excel("")  

Loading data directly from PANDAS "importdata file - Is this a good choice?

event, values = window.read()

table_gui()

I think the object route would be "better code". Can you give me an idea of the best object to go for this project, or if there's a better road altogether.

The CSV file has the following headings fyi Year Class Pupil Day Period Name Week Group

Aucun commentaire:

Enregistrer un commentaire