shmid = shmget(SHM_KEY, SHM_SIZE, 0o666) - syntax error.

Chris Angelico rosuav at gmail.com
Tue Apr 30 11:49:11 EDT 2013


On Wed, May 1, 2013 at 1:43 AM, Dave Angel <davea at davea.name> wrote:
> On 04/30/2013 11:27 AM, tromeo at mdlogix.com wrote:
>>
>>
>> Please help me to debug
>>
>> -------
>> shmid = shmget(SHM_KEY, SHM_SIZE, 0o666)
>>                                                                     ^
>> SyntaxError: invalid syntax
>>
>
> 0o666 is indeed a syntax error.  What is that value supposed to be?  If it's
> intended to be an int that's equal to octal 666, just use 438

Without checking docs, I would guess that to be Unix file permissions,
which make most sense in octal.

ChrisA



More information about the Python-list mailing list