Drawing a table for data from file
Python has many great ways to iterate.  In general if you find yourself looping on an integer, like in the following code, there is a good chance you are doing it wrong.  It is generally better to iterate on the data structure itself.

Sample code:

I will use this loop as an example:

len_of_longest_name = 0
i = 0
while i &lt; len(table):
    if len_of_longest_name &lt; len(table[i][1]):
        len_of_longest_name = len(table[i][1])
    i += 1


Don't iterate on the length of a data structure:

This is probably not what you want:

while i &lt; len(table):


It would likely be better as something like:

for row in table:


Or, if for some reason you really need the index, then:

for i, row in enumerate(table):


Example with looping on length removed:

So removing i, and looping on table, we get:

len_of_longest_name = 0
for row in table:
    if len_of_longest_name &lt; len(row[1]):
        len_of_longest_name = len(row[1])


Use builtin functions.

Python have a max() function.  Using max(), the example becomes:

len_of_longest_name = 0
for row in table:
    len_of_longest_name = max(len_of_longest_name, len(row[1]))


Comprehensions:

Since max() can take a comprehension the example loop can be reduced to:

len_of_longest_name = max(len(row[1]) for row in table)


That is six lines of code reduced to one.