[Tutor] Module webbrowser.os

Alan Gauld alan.gauld at yahoo.co.uk
Thu Nov 3 05:19:49 EDT 2016


On 03/11/16 06:43, Palanikumar Gopalakrishnan wrote:
> On Wed, Nov 2, 2016 at 7:36 AM, <tutor-request at python.org> wrote:
...
>> Today's Topics:
>>
>>    1. Re: Python code (Danny Yoo)
>>    2. Re: implementing sed - termination error (cs at zip.com.au)
>>    3. Module webbrowser.os (Palanikumar Gopalakrishnan)
>>    4. Re: implementing sed - termination error (Peter Otten)
>>    5. Re: Module webbrowser.os (Alan Gauld)
>>    6. Re: Module webbrowser.os (Steven D'Aprano)

Please do not send the entire digest.
Delete all that is not relevant. Everyone else has already seen
those messages and some users pay by the byte.

> Hi Alan,
> 
>            My python version is *2.7.  *I tried the following but it not
> working , Returns same error message
> 
> 
> webbrowser.os(umask)
> 
> webbrowser.os(umask(0x777))
> 
As Steve pointed out in his most recent post it should
have been:

webbrowser.os.umask(0x777)

umask is an *attribute* of os not a parameter.

And as we have both pointed out don't use webbrowser.os,
just use os directly:

import os
os.umask(24)

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list