Suppose I have python 3.2, I will compile my program into the pyc file and, for example, I want to throw it to a friend, but it has python 2.7. Will it run the program?

    2 answers 2

    I can be a little mistaken for all versions of python I can not vouch, but each version of python has its own version of the compiler and when trying to import a module compiled by another version of python, an error occurs: bad magik number
    faced it for a long time on versions of python to 2.5
    how things are right now I don't know

      It depends on how it is written in 3.2 ... they have differences in some commands. I think so ..) and it's easier to take and try))

      Well, either install another 2.7 and try to run through it a file written in 3.2 =)