How to lanch a webbrowser

Discussion in 'Python' started by export@hope.cz, Jan 19, 2005.

  1. Guest

    Does anyone know
    how to lanch a webbrowser ( from Python) without menu and toolbars?
    Thanks for help
    Lad
     
    , Jan 19, 2005
    #1
    1. Advertising

  2. Ola Natvig Guest

    wrote:
    > Does anyone know
    > how to lanch a webbrowser ( from Python) without menu and toolbars?
    > Thanks for help
    > Lad
    >


    You've got the webbrowser module which lauches the OS's standard browser

    from webbrowser import get
    get("www.example.org")

    launches the webbrowser, but how to launch it without menu and toolbar I
    don't know. You could launch a small HTML page containing a javascript
    that launches your wanted page.

    --
    --------------------------------------
    Ola Natvig <>
    infoSense AS / development
     
    Ola Natvig, Jan 19, 2005
    #2
    1. Advertising

  3. aurora Guest

    Simple. Use the webbrowser module.

    > Does anyone know
    > how to lanch a webbrowser ( from Python) without menu and toolbars?
    > Thanks for help
    > Lad
    >
     
    aurora, Jan 19, 2005
    #3
  4. Peter Hansen Guest

    wrote:
    > Does anyone know
    > how to lanch a webbrowser ( from Python) without menu and toolbars?


    Someone will no doubt point you to the "smart questions" page
    as a result of this.... if nothing else because you've provided
    no information whatsoever about the platform you are running on.

    The simple answer is that Python provides a variety of things,
    such as COM/ActiveX (on Windows), os.system, os.popen* and spawn,
    the subprocess module, os.startfile(), and others, as ways of
    starting external applications.

    You could also no doubt find ways to integrate a web browser
    into a Python program, such as by using ActiveX to stick the
    InternetExplorer application into a wxPython program

    Provide some useful background on your situation and you
    might get some useful answers.

    (I note that Eric Raymond's catb.org site is offline at this
    moment, so go to the following link to read the "smart
    questions" page that somebody will doubtless point you to:
    http://www.google.ca/search?q=cache...esr/faqs/smart-questions.html smart questions
    )

    -Peter
     
    Peter Hansen, Jan 19, 2005
    #4
  5. Steve Holden Guest

    Ola Natvig wrote:

    > wrote:
    >
    >> Does anyone know
    >> how to lanch a webbrowser ( from Python) without menu and toolbars?
    >> Thanks for help
    >> Lad
    >>

    >
    > You've got the webbrowser module which lauches the OS's standard browser
    >
    > from webbrowser import get
    > get("www.example.org")
    >
    > launches the webbrowser, but how to launch it without menu and toolbar I
    > don't know. You could launch a small HTML page containing a javascript
    > that launches your wanted page.
    >

    This would indeed be the best way. The page you launched should contain
    a script that creates another window. Since this would be browser-based
    javascript, it could specify the appropriate browser window attributes
    (see, for example

    http://www.javascripter.net/faq/openinga.htm

    which shows you how to specify the appropriate window characteristics).

    The onload attribute of the first page's body could then specify closing
    the window you opened from Python.

    You may find that this close operation generates a warning from the
    browser about scripts doing naughty things, however.

    regards
    Steve
    --
    Steve Holden http://www.holdenweb.com/
    Python Web Programming http://pydish.holdenweb.com/
    Holden Web LLC +1 703 861 4237 +1 800 494 3119
     
    Steve Holden, Jan 19, 2005
    #5
  6. Guest

    Steve Holden wrote:
    > Ola Natvig wrote:
    >
    > > wrote:
    > >
    > >> Does anyone know
    > >> how to lanch a webbrowser ( from Python) without menu and

    toolbars?
    > >> Thanks for help
    > >> Lad
    > >>

    > >
    > > You've got the webbrowser module which lauches the OS's standard

    browser
    > >
    > > from webbrowser import get
    > > get("www.example.org")
    > >
    > > launches the webbrowser, but how to launch it without menu and

    toolbar I
    > > don't know. You could launch a small HTML page containing a

    javascript
    > > that launches your wanted page.
    > >

    > This would indeed be the best way. The page you launched should

    contain
    > a script that creates another window. Since this would be

    browser-based
    > javascript, it could specify the appropriate browser window

    attributes
    > (see, for example
    >
    > http://www.javascripter.net/faq/openinga.htm
    >
    > which shows you how to specify the appropriate window

    characteristics).
    >
    > The onload attribute of the first page's body could then specify

    closing
    > the window you opened from Python.
    >
    > You may find that this close operation generates a warning from the
    > browser about scripts doing naughty things, however.
    >
    > regards
    > Steve
    > --
    > Steve Holden http://www.holdenweb.com/
    > Python Web Programming http://pydish.holdenweb.com/
    > Holden Web LLC +1 703 861 4237 +1 800 494 3119


    Thank you Steve for the http link( was good) and to you all others as
    well who helped me.
    Lad
     
    , Jan 20, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel Frede

    ASPNET and Webbrowser control

    Daniel Frede, May 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    4,610
    Ken Cox [Microsoft MVP]
    May 18, 2004
  2. ASP .NET Newbie
    Replies:
    10
    Views:
    14,827
    jojobouy
    Sep 28, 2007
  3. clintonG
    Replies:
    3
    Views:
    599
    Hermit Dave
    Sep 25, 2004
  4. =?Utf-8?B?SnVsaWE=?=
    Replies:
    4
    Views:
    777
    =?Utf-8?B?SnVsaWE=?=
    Nov 7, 2004
  5. =?Utf-8?B?S2VubmV0aCBQ?=

    How to get a PDF opening in a clients webbrowser?

    =?Utf-8?B?S2VubmV0aCBQ?=, Nov 14, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    418
    =?Utf-8?B?S2VubmV0aCBQ?=
    Nov 18, 2004
Loading...

Share This Page