473,395 Members | 2,783 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to lanch a webbrowser

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

Jul 18 '05 #1
5 4637
ex****@hope.cz 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 <ol********@infosense.no>
infoSense AS / development
Jul 18 '05 #2
Simple. Use the webbrowser module.
Does anyone know
how to lanch a webbrowser ( from Python) without menu and toolbars?
Thanks for help
Lad


Jul 18 '05 #3
ex****@hope.cz 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:...mart+questions
)

-Peter
Jul 18 '05 #4
Ola Natvig wrote:
ex****@hope.cz 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
Jul 18 '05 #5

Steve Holden wrote:
Ola Natvig wrote:
ex****@hope.cz 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

Jul 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jim Hubbard | last post by:
How would I implement the IDispatch interface to handle the following in VB.Net <BEGIN> Controlling Download and Execution The WebBrowser Control gives you control over what it downloads,...
5
by: SPE - Stani's Python Editor | last post by:
Hi, During optimizing SPE for Ubuntu, I found something strange. I have Ubuntu 5.10 "The Breezy Badger" and unfortunately this code is not working: >>> import webbrowser >>>...
12
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but...
8
by: Prosperz | last post by:
Hi, I would like to make thumbnails of web page by capture content of a WebBrowser. By example, capture http://www.google.com. I used WebBrowser control with Framework 2.0. I try this : ...
8
by: Dustan | last post by:
At http://docs.python.org/whatsnew/modules.html on the webbrowser module, it says "A number of additional browsers were added to the supported list such as Firefox, Opera, Konqueror, and elinks." ...
11
by: Anil Gupte | last post by:
....and how do I insert one into my form? I used in VB 6.0 last, but cannot figure out where it is in .Net Thanx, -- Anil Gupte www.keeninc.net www.icinema.com
18
by: Zytan | last post by:
I have multiple threads writing to WebBrowser (using a function that checks InvokedRequired, and if so, invokes itself on the WebBrowser thread) and they are getting deadlocked. They only...
11
by: kimiraikkonen | last post by:
Hi there, I needed to use MouseOver event on Webbrowser which is NOT provided by webbrowser control natively(what a disappointment), so i decided to go with another route to simulate this like: ...
3
by: TedTrippin | last post by:
Hi, Background - I've create a windows application in VS and added a WebBrowser component and all works well. I'm now trying to do this programmatically. My application now listens on a socket...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.