To get all of the files in a directory, you can use os.listdir.
>>> import os
>>> basedir = 'tmp/example'
>>> names = os.listdir(basedir)
>>> names
['a', 'b', 'c']
Then you need to add basedir on to the names:
>>> paths = [os.path.join(basedir, name) for name in names]
>>> paths
['tmp/example/a', 'tmp/example/b', 'tmp/example/c']
Then you can turn that into a list of pairs of (name, size) using a os.stat(path).st_size (the example files I've created are empty):
>>> sizes = [(path, os.stat(path).st_size) for path in paths]
>>> sizes
[('tmp/example/a', 0), ('tmp/example/b', 0), ('tmp/example/c', 0)]
Then you can group the paths with the same size together by using a collections.defaultdict:
>>> import collections
>>> grouped = collections.defaultdict(list)
>>> for path, size in sizes:
... grouped[size].append(path)
...
>>> grouped
defaultdict(<type 'list'>, {0: ['tmp/example/a', 'tmp/example/b', 'tmp/example/c']})
Now you can get all of the files by size, and open them all (don't forget to close them afterwards!):
>>> open_files = [open(path) for path in grouped[0]]