By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,941 Members | 1,753 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,941 IT Pros & Developers. It's quick & easy.

code of

P: n/a

I was looking at the code of included in python 2.3.3. I
think there are some
obvious problems with it (tested with mozilla on Linux).

(*) If you open an url (with the option "new window") and the browser is
not already running
then it opens *two* windows: the home page and your url. This is
different for example
from the default behaviour on Windows.

(**) There is another related problem: if you open an url
and the browser is not already running then the code starts a new
browser, does a timed sleep
and then issues a "-remote" command.

Using a timed sleep is *very fragile*, and indeed I had failures because
the delay
(PROCESS_CREATION_DELAY) was not long enough. At the very least the -remote
command should be tried a couple of times.

BUT: there is no reason *at all* to issue a -remote command in this
case. All browsers I know
accept an url as argument. So one can just start a new browser with the
url as argument.

(***) Mozilla type browsers now have a -remote "ping()" command. This is
perhaps a
cleaner way to detect a running browser.

Any comments?

Best regards,

Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.