python 3.2 import issue

后端 未结 3 990
野趣味
野趣味 2020-12-22 00:14

I\'ve been troubleshooting for the past few days trying to install distribute so I can start importing 3rd party modules. I haven\'t used python for a couple years so I\'m r

3条回答
  •  既然无缘
    2020-12-22 00:44

    The issue is that Python 3 interprets octal numbers differently than Python 2.x. In 2.x you could just prefix a number with a 0 to indicate that it is octal. In Python 3 you prefix it with 0o, so your number needs to be 0o777.

    def _bypass_ensure_directory(name, mode=0o777):
    

    See http://docs.python.org/release/3.0.1/whatsnew/3.0.html#integers for more details.

提交回复
热议问题