Python not interpreting changed files, using obsolete .pyc

后端 未结 3 748
遇见更好的自我
遇见更好的自我 2021-01-15 07:55

Using the Google App Engine to develop in python yesterday it stopped running the current version of the script. Instead of executing the most recent version it seems to run

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-15 08:58

    Are you editing the .py files on a different system than where they are being compiled ?

    The compiler recompiles the .py files if its modification date is newer than the modification date of the .pyc file.

    The fact that it is picking the .pyc file for use points to the fact that your .py file has an older modification date. This is only possible if your .py file is being modified on a different system and then being copied to the one where it is to be used and the editing environment/system's clock is set behind the runtime enviroment/system's clock.

提交回复
热议问题