[Python-3000] Py3k doesn't understand octal literals (on Windows)

Thomas Heller theller at ctypes.org
Thu Jun 28 20:33:57 CEST 2007


Thomas Heller schrieb:
> In a break from real work, I wanted to play a little with 3.0.  Did svn update, and built on Windows.
> Unfortunately, the resulting Python does not understand the new octal literals like 0o777, so
> importing 'os' fails:
> 
> 'import site' failed; use -v for traceback
> Python 3.0x (p3yk:55071M, May  2 2007, 13:50:45) [MSC v.1310 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import os
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "c:\svn\p3yk\lib\os.py", line 150
>     def makedirs(name, mode=0o777):
>                                 ^
> SyntaxError: invalid syntax
>>>>
> 
> Any hints on what I have to do to make this work?
> 
> Thanks,
> Thomas
> 

Sorry for the false alarm, it was all my fault.

Thomas



More information about the Python-3000 mailing list