473,326 Members | 2,099 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,326 software developers and data experts.

Put a url in a browsers address bar

Dear All,

I would like to place a url in my browsers address bar, then execute.
How can do this?

e.g.

def goToGoogle():
url = "www.google.com"
b = openBrowser()
b.goToUrl(url)
return True

Thanks for any help

Colin
Aug 18 '05 #1
6 2229

On Thu, 18 Aug 2005 12:01:16 -0400, Colin Gillespie
<c.*********@ncl.ac.uk> wrote:
I would like to place a url in my browsers address bar, then execute.
How can do this?

e.g.

def goToGoogle():
url = "www.google.com"
b = openBrowser()
b.goToUrl(url)
return True


def goToGoogle():
import webbrowser
webbrowser.open("www.google.com");

Alan
Aug 18 '05 #2
>
I would like to place a url in my browsers address bar, then execute.
How can do this?


def goToGoogle():
import webbrowser
webbrowser.open("www.google.com");


Thanks for the quick reply. Do you know what module I would use to fill
out a form on an open web page?

Thanks

Colin
Aug 18 '05 #3
Colin Gillespie wrote:
I would like to place a url in my browsers address bar, then execute.
How can do this?


def goToGoogle():
import webbrowser
webbrowser.open("www.google.com");


Thanks for the quick reply. Do you know what module I would use to fill
out a form on an open web page?


The answer involves Google again, but this time it is "Use Google Groups
to search the archives for previous answers to questions like yours",
which is good advice to follow most of the time when you have a question
that seems likely to have been asked before.

Try this search pattern for a start "python fill out form on web page".

(Note, Google Groups, not just Google.)

-Peter
Aug 18 '05 #4
Colin Gillespie wrote:
I would like to place a url in my browsers address bar, then execute.
How can do this?


def goToGoogle():
import webbrowser
webbrowser.open("www.google.com");

Thanks for the quick reply. Do you know what module I would use to fill
out a form on an open web page?

Thanks

Colin

You could take a look at John Lee's ClientForm module. Start at

http://wwwsearch.sourceforge.net/ClientForm/

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Aug 18 '05 #5
Colin Gillespie wrote:
I would like to place a url in my browsers address bar, then execute.
How can do this?


def goToGoogle():
import webbrowser
webbrowser.open("www.google.com");

Thanks for the quick reply. Do you know what module I would use to fill
out a form on an open web page?

Thanks

Colin

Oops. ClientForm expects you to be interacting directly with the server,
not driving an open browser window. To do the same thing through the
browser would involve using COM, I suspect. If so be careful, as what
you implement may end up being browser-specific.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Aug 18 '05 #6
ina
Here is a start.

http://www.ishpeck.net/?P=pytesting
This is all stuff based on windos.

Colin Gillespie wrote:
Dear All,

I would like to place a url in my browsers address bar, then execute.
How can do this?

e.g.

def goToGoogle():
url = "www.google.com"
b = openBrowser()
b.goToUrl(url)
return True

Thanks for any help

Colin


Aug 18 '05 #7

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

Similar topics

4
by: Dariusz | last post by:
I have constructed a PHP generated HTML layout, which on POSTing the menu option the user selects, calls the same PHP code / page which generates the HTML page and GET's the correct SHTML page into...
3
by: The wee free man | last post by:
Hi, Except for using the hosts url masking, there seems to be a way to use escaping characters and javascript to hide the filename in the browsers address bar. Does anyone know how? I can't...
4
by: Joe | last post by:
Hello, I have created a login page using dotnet. I am using requiredFieldValidator and noticed that the code works fine in IE but not in Netscape, Opera, Mozilla, Firefox, etc. For example...
2
by: Jensen bredal | last post by:
I want to control the link that is displayed in the addresse bare. Can this be done? How? Many thanks in advance JB
10
by: Raffi | last post by:
Hi, I'm looking for a way using JavaScript to determine if the browser window has an address bar. Thanks, Raffi
9
by: chadlupkes | last post by:
I have this code from someone else, and I'm trying to make heads or tails of it because IE doesn't like it. Can anyone help? Or does anyone have a better idea? /* parse the email to check for...
3
by: =?Utf-8?B?TWFyaw==?= | last post by:
I have an ASP.Net 1.1 site that uses Server.Transfer() heavily. Specifically, I use a page called /misc/pagenotfound.aspx to implement logic that maps URLs of the format /vdir/california to a...
0
by: ishraque510 | last post by:
Hello friends, I want to access the browsers address bar whenever user enters url into the address bar of browser and either presses enter or clicks on go. Then i want to change the url to, lets...
5
mikek12004
by: mikek12004 | last post by:
I have a site already constructed with tons of links targeting physical files, I want when the user types http://www.mypage.com/index.php?a=2&b=3 to load the actual page but in the browsers address...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.