import os
e = 'ta'*156
f = 'at'*156
def split_input(string, chunk_size):
num_chunks = len(string)/chunk_size
if (len(string) % chunk_size != 0):
num_chunks += 1
output = []
for i in range(0, int(num_chunks)):
output.append(string[chunk_size * i:chunk_size * (i+1)])
return output
def printDna(dna1, dna2, tamanho):
chunks1 = split_input(dna1, tamanho)
chunks2 = split_input(dna2, tamanho)
for i in range(0, len(chunks1)):
print(chunks1[i])
print('|'*len(chunks1[i]))
print(chunks2[i])
print
rows, columns = os.popen('stty size', 'r').read().split()
printDna(e, f, columns)
aW1wb3J0IG9zCgplID0gJ3RhJyoxNTYKZiA9ICdhdCcqMTU2CgpkZWYgc3BsaXRfaW5wdXQoc3RyaW5nLCBjaHVua19zaXplKToKICAgIG51bV9jaHVua3MgPSBsZW4oc3RyaW5nKS9jaHVua19zaXplCiAgICBpZiAobGVuKHN0cmluZykgJSBjaHVua19zaXplICE9IDApOgogICAgICAgIG51bV9jaHVua3MgKz0gMQogICAgb3V0cHV0ID0gW10KICAgIGZvciBpIGluIHJhbmdlKDAsIGludChudW1fY2h1bmtzKSk6CiAgICAgICAgb3V0cHV0LmFwcGVuZChzdHJpbmdbY2h1bmtfc2l6ZSAqIGk6Y2h1bmtfc2l6ZSAqIChpKzEpXSkKICAgIHJldHVybiBvdXRwdXQKCmRlZiBwcmludERuYShkbmExLCBkbmEyLCB0YW1hbmhvKToKCWNodW5rczEgPSBzcGxpdF9pbnB1dChkbmExLCB0YW1hbmhvKQoJY2h1bmtzMiA9IHNwbGl0X2lucHV0KGRuYTIsIHRhbWFuaG8pCgkKCWZvciBpIGluIHJhbmdlKDAsIGxlbihjaHVua3MxKSk6CgkJcHJpbnQoY2h1bmtzMVtpXSkKCQlwcmludCgnfCcqbGVuKGNodW5rczFbaV0pKQoJCXByaW50KGNodW5rczJbaV0pCgkJcHJpbnQKCQkKcm93cywgY29sdW1ucyA9IG9zLnBvcGVuKCdzdHR5IHNpemUnLCAncicpLnJlYWQoKS5zcGxpdCgpCgpwcmludERuYShlLCBmLCBjb2x1bW5zKQ==
stty: standard input: Inappropriate ioctl for device
Traceback (most recent call last):
File "<builtin>/app_main.py", line 75, in run_toplevel
File "prog.py", line 25, in <module>
rows, columns = os.popen('stty size', 'r').read().split()
ValueError: expected length 2, got 0