Vigenère cipher with sha512 and a little foresight turns to one-time pad. How safe can be? I'm doing some exercises and of course I have read about the weaknesses of Vigenère cipher because it repeats the key. But what if I use a different hash every time? The hash of the "key + an increasing number". 
In this example I encode a plaintext just with a sum of every single char (text[0] + pswhash[0] and so on). blocksize is 128 because I use sha512.

    f = open(filename)
    f2 = open(filename+'.encoded','w')
    x = 0
    while True:
        string = f.read(blocksize)
        if not string:
            break
        pswhash = sha512((psw+str(x)).encode('utf-8')).hexdigest()
        f2.write(encode(string, pswhash))
        x+=1
    f.close
    f2.close
    print("File encoded.")


how safe this could be?
Is this a real one-time pad?
Is this a real one-time pad?


No, it's not a one time pad; as the keystream is not generated from a truly random process, hence you don't get the informational security guarrantees that you'd get from a true OTP.

Instead, it's a stream cipher; in particular, counter mode (with SHA512 is the "block cipher"; in counter mode, the block cipher needn't be invertable).

It's actually decent at providing privacy (albeit not very fast at it); however, it still would need some integrity protection (unless you're absolutely positive that an attacker cannot alter the ciphertext)