473,671 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4650
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.exampl e.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********@inf osense.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
InternetExplore r 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.exampl e.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.exampl e.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
3460
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, displays, and executes. To gain this control, you need to implement your host's IDispatch so it handles DISPID_AMBIENT_DLCONTROL. When the WebBrowser Control is instantiated, it will call your IDispatch::Invoke with this ID. Set pvarResult to a...
5
3111
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 >>> webbrowser.open("http://www.python.org") It does not throw an exception, but is not able to launch a browser.
12
6363
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 of course it's thrown up a whole host of new issues... I'm generating a multi page printable document in HTML from my app, and displaying it in a WebBrowser control. I've looked into using some CSS
8
3401
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
4628
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." I just installed python 2.5, looking forward to being able to control firefox without having to make it my default browser, but... I don't seem to have that functionality. In IDLE: {'windows-default': }
11
2818
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
6845
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 deadlock when I use lock { } around the call to WebBrowser.Write to ensure thread safety! Does any one have experience with such a thing? Zytan
11
2208
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: //////////////////////////////////////////////// Public Sub DisplayHyperlinks(ByVal sender As Object, ByVal e As System.Windows.Forms.HtmlElementEventArgs)
3
9434
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 and when it receives a request it creates a new Form and adds a new WebBrowser. The problem - All works well without the WebBrowser, the form is visible, but when I do "Controls.Add(webBrowser)" I see nothing, not even something in the windows...
0
8472
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8390
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8909
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8819
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8667
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4399
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1801
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.