I have a shared folder that contains a text file that I want my program to reference as though it were a .py file. For example, my .txt file has a dictionary in it that I reference in my program. How do i import the dictionary from a text file? Do i read it in line by line? Or is there a way to trick python into thinking it is a .py file.
Here is a sample similar to my .txt file:
#There are some comments here and there
#lists of lists
equipment = [['equip1','hw','1122','3344'],['equip2','hp','1133','7777'],['equip3','ht','3333','2745']]
#dictionaries
carts = {'001':'Rev23', '002':'Rev11','003':'Rev7'}
#regular lists
stations = ("1", "2", "3", "4", "11", "Other")