[Tutor] Code to open a website

mann kann mannkann5 at gmail.com
Sun Feb 10 02:25:35 CET 2013


I used webbrowser and it worked via terminal, but the same code returns
AttrituteError: 'module' object has no attribute 'open' in komodo edit.
suggestions? here's the code:

import webbrowser
webbrowser.open("http://youtube.com")



On Sat, Feb 9, 2013 at 8:17 PM, Wayne Werner <wayne at waynewerner.com> wrote:

> On Sat, 9 Feb 2013, mann kann wrote:
>
>  Dear Jedi,
>> I wrote my first program but it doesn't open a website as I intended it
>> to.
>> Please correct my mistake.
>>
>> Sincerely,
>> Mann
>>
>
> You'll actually want the webbrowser module, which will open the links in
> your web browser - at least if you want to load sites like YouTube.
>
> HTH,
> Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130209/bc9e3991/attachment.html>


More information about the Tutor mailing list