Variable Explorer when loading from Pickle

14 views
Skip to first unread message

Lindsay

unread,
Sep 19, 2022, 1:29:55 PM9/19/22
to spyder
When I create a dictionary object with 

myDict =     FD ={"hello":"salut",
                   "g'day":"bonjour",
                   "house":"loger",
                   "word":"mot"
                   }

it appears in the variable explorer as expected.

However, when I use pickle to load it from a file:
try:
    with open("dictionary.dat", "rb") as fileHandle:
        FD=pickle.load(fileHandle)

The file handle appears - but not FD (the dictionary object).
(If I print FD it prints as a dictionary though - so it did load successfully.)

Why doesn't the Dictionary appear in the variable explorer when loaded from pickle? And is this expected behaviour?
Thanks
Lindsay

Reply all
Reply to author
Forward
0 new messages