You were almost there; you should use key as the key in the dictionary, not file:
(key, val) = line.split(': ')
d[key] = val.rstrip('\n')
I've added a str.strip() call; presumably you don't need to store the newline at the end of each line.
You'll need to parse the list of purchases separately however, as those don't fit your key: value pattern here. I'm assuming here that it is the last entry in the list:
d = {}
with open("sometext.txt", "r") as f:
for line in f:
if line.startswith('List of purchases'):
purchases = d['List of purchases'] = []
for line in f:
info = line.strip('() \n').split(', ')
purchases.append(info)
break
key, val = line.split(': ')
d[key] = val.rstrip('\n')
This will read the remainder of the file into a separate list when you read the List of purchases line.
Demo:
>>> from io import StringIO
>>> sample = '''\
... Shop: someshop
... Schedule: from 8:00 to 18:00
... Day: 11:11:2011
... Items Sold: 456
... List of purchases:
... (product, 123, 12:30)
... (product, 123, 12:30)
... (product, 123, 12:30)
... '''
>>> d = {}
>>> with StringIO(sample) as f:
... for line in f:
... if line.startswith('List of purchases'):
... purchases = d['List of purchases'] = []
... for line in f:
... info = line.strip('()\n').split(', ')
... purchases.append(info)
... break
... key, val = line.split(': ')
... d[key] = val.rstrip('\n')
...
>>> d
{'Schedule': 'from 8:00 to 18:00 ', 'List of purchases': [['product', '123', '12:30'], ['product', '123', '12:30'], ['product', '123', '12:30']], 'Day': '11:11:2011 ', 'Shop': 'someshop ', 'Items Sold': '456 '}
>>> from pprint import pprint
>>> pprint(d)
{'Day': '11:11:2011 ',
'Items Sold': '456 ',
'List of purchases': [['product', '123', '12:30'],
['product', '123', '12:30'],
['product', '123', '12:30']],
'Schedule': 'from 8:00 to 18:00 ',
'Shop': 'someshop '}