5,337
edits
No edit summary |
No edit summary |
||
Line 20: | Line 20: | ||
gazeFiles = [path.join(x, y) for x in gazeFolders for y in os.listdir(x)] | gazeFiles = [path.join(x, y) for x in gazeFolders for y in os.listdir(x)] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Read entire text file into a list=== | |||
[https://stackoverflow.com/questions/3925614/how-do-you-read-a-file-into-a-list-in-python/3925701] | |||
<syntaxhighlight lang="python"> | |||
with open('C:/path/numbers.txt') as f: | |||
lines = f.read().splitlines() | |||
</syntaxhighlight> | |||
=Libraries= | =Libraries= | ||
==Numpy== | ==Numpy== |