Re: Requests for webbrowser module

2016-09-16 Thread Jamie Ansell
Jamie < > ja9...@my.bristol.ac.uk> writes: > > > I am not sure if this is an intended consequence but when using the > > webbrowser module to open a new blank browser tab in chrome it opens it > > in a new browser window instead of using the current window. Providi

Re: Requests for webbrowser module

2016-09-14 Thread John Gordon
In Jamie writes: > I am not sure if this is an intended consequence but when using the > webbrowser module to open a new blank browser tab in chrome it opens it > in a new browser window instead of using the current window. Providing There is an internal setting within Chrome that

Re: Requests for webbrowser module

2016-09-14 Thread MRAB
On 2016-09-14 17:53, Jamie wrote: Hi, I am not sure if this is an intended consequence but when using the webbrowser module to open a new blank browser tab in chrome it opens it in a new browser window instead of using the current window. Providing any complete url provides different behaviour

Requests for webbrowser module

2016-09-14 Thread Jamie
Hi, I am not sure if this is an intended consequence but when using the webbrowser module to open a new blank browser tab in chrome it opens it in a new browser window instead of using the current window. Providing any complete url provides different behaviour, it opening a new tab in the

Re: webbrowser module bug?

2014-01-31 Thread Chris Angelico
On Sat, Feb 1, 2014 at 1:24 AM, Steven D'Aprano wrote: > On Fri, 31 Jan 2014 06:07:39 -0500, Robert Watson wrote: > >> Sorry. Experiencing same problem in Python 2.6.4 on Ubuntu 10.04 >> (actually, Puppy Linux 5.2.8 which is based on Ubuntu Lucid) >> >> If anyone happens to see this and knows what

Re: webbrowser module bug?

2014-01-31 Thread Steven D'Aprano
On Fri, 31 Jan 2014 06:07:39 -0500, Robert Watson wrote: > Sorry. Experiencing same problem in Python 2.6.4 on Ubuntu 10.04 > (actually, Puppy Linux 5.2.8 which is based on Ubuntu Lucid) > > If anyone happens to see this and knows what was settled on as the best > workaround, please email me a li

webbrowser module bug?

2014-01-31 Thread Robert Watson
Sorry. Experiencing same problem in Python 2.6.4 on Ubuntu 10.04 (actually, Puppy Linux 5.2.8 which is based on Ubuntu Lucid) If anyone happens to see this and knows what was settled on as the best workaround, please email me a link to it or something at robertcwat...@yahoo.com. Robert "DocSalvag

Re: Looking for pointers/suggestion - how to make a webbrowser with these restriction?

2012-09-26 Thread Chris Angelico
On Wed, Sep 26, 2012 at 8:41 PM, Anthony Kong wrote: > Hi, Chris, > > Thanks for your reply. I really do not have any requirement. It is more a > curiosity question (not work related). I'd like to find out how python can be > used to 'glue' all these moving parts together. Performance and securi

Re: Looking for pointers/suggestion - how to make a webbrowser with these restriction?

2012-09-26 Thread Anthony Kong
Hi, Chris, Thanks for your reply. I really do not have any requirement. It is more a curiosity question (not work related). I'd like to find out how python can be used to 'glue' all these moving parts together. Performance and security are definitely not a concern as it is just a toy idea/proje

Re: Looking for pointers/suggestion - how to make a webbrowser with these restriction?

2012-09-26 Thread Chris Angelico
On Wed, Sep 26, 2012 at 6:23 PM, Anthony Kong wrote: > Hi, all, > > It is kind of a MacGyver question. I am just looking for some general > suggestions/pointer. > > First let me first describe the development environment I am in: it is a > locked down WinXP PC with limited development tools and

Looking for pointers/suggestion - how to make a webbrowser with these restriction?

2012-09-26 Thread Anthony Kong
Hi, all, It is kind of a MacGyver question. I am just looking for some general suggestions/pointer. First let me first describe the development environment I am in: it is a locked down WinXP PC with limited development tools and libraries. At my disposal I have python 2.6 , webkit 5.33 dll, wx

Re: how can i register the non-default browser with the webbrowser module?

2012-09-05 Thread Mark Lawrence
On 05/09/2012 15:32, Levi Nie wrote: how can i register the non-default browser with the webbrowser module? the case: i want open a site such as "google.com" in ie8 with the python.But my default is chrome. so i want to register a ie8 controller with the webbrowser.register(*name*, *c

Re: how can i register the non-default browser with the webbrowser module?

2012-09-05 Thread Peter Otten
Levi Nie wrote: > how can i register the non-default browser with the webbrowser module? > > the case: > i want open a site such as "google.com" in ie8 with the python.But my > default is chrome. > so i want to register a ie8 controller with the > webbrowse

how can i register the non-default browser with the webbrowser module?

2012-09-05 Thread Levi Nie
how can i register the non-default browser with the webbrowser module? the case: i want open a site such as "google.com" in ie8 with the python.But my default is chrome. so i want to register a ie8 controller with the webbrowser.register(*name*, *constructor*[, *instance*]). so wha

Calling JavaScript inside the webbrowser module

2011-10-30 Thread Anders Gunnarsson
Hi! Is there anyway to communicate with JavaScript inside a website opened via the webbrowser module? | import webbrowser | webbrowser.open('http://python.org') Here I'd like to do something like webbrowser.call('alert(1)') and I'd like to be able to call the

Re: Control webbrowser from Python script

2010-10-10 Thread luca
On Oct 9, 11:39 am, Johny wrote: > Is it possible to control any webbrowser from Python ? For example to > issue http POST and GET  command > Thanks > Johny I'm using funkload and it is awesome! http://funkload.nuxeo.org/ FunkLoad is a functional and load web tester, written

Re: Control webbrowser from Python script

2010-10-09 Thread Diez B. Roggisch
Johny writes: > On Oct 9, 5:17 pm, Tim Harig wrote: >> On 2010-10-09, Johny wrote: >> >> > Is it possible to control any webbrowser from Python ? For example to >> > issue http POST and GET  command >> >> The most reliable way to interact with a w

Re: Control webbrowser from Python script

2010-10-09 Thread Johny
On Oct 9, 5:17 pm, Tim Harig wrote: > On 2010-10-09, Johny wrote: > > > Is it possible to control any webbrowser from Python ? For example to > > issue http POST and GET  command > > The most reliable way to interact with a webserver is through the urllib > an

Re: Control webbrowser from Python script

2010-10-09 Thread Tim Harig
On 2010-10-09, Johny wrote: > Is it possible to control any webbrowser from Python ? For example to > issue http POST and GET command The most reliable way to interact with a webserver is through the urllib and httplib modules. This is effective for 99% of cases. I do understand tha

Re: Control webbrowser from Python script

2010-10-09 Thread Emmanuel Surleau
> Is it possible to control any webbrowser from Python ? For example to > issue http POST and GET command > Thanks > Johny http://docs.python.org/library/webbrowser.html The control you get is rather limited, though. If your aim is interacting with a website, though, you can try ur

Re: Control webbrowser from Python script

2010-10-09 Thread Matteo Landi
t possible to control any webbrowser from Python ? For example to > issue http POST and GET  command > Thanks > Johny > -- > http://mail.python.org/mailman/listinfo/python-list > -- Matteo Landi http://www.matteolandi.net/ -- http://mail.python.org/mailman/listinfo/python-list

Control webbrowser from Python script

2010-10-09 Thread Johny
Is it possible to control any webbrowser from Python ? For example to issue http POST and GET command Thanks Johny -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess in Command promt+ webbrowser

2010-06-19 Thread shanti bhushan
On Jun 19, 11:01 am, shanti bhushan wrote: > I have a code ,in which i invoke the local webserver in back > ground ,then open URL and access the web page. > below is my code. > I am able to invoke and kill the local webserver in seperate python > script,but when i club opening of browser and and s

Re: subprocess in Command promt+ webbrowser

2010-06-18 Thread shanti bhushan
On Jun 19, 11:01 am, shanti bhushan wrote: > I have a code ,in which i invoke the local webserver in back > ground ,then open URL and access the web page. > below is my code. > I am able to invoke and kill the local webserver in seperate python > script,but when i club opening of browser and and s

subprocess in Command promt+ webbrowser

2010-06-18 Thread shanti bhushan
I have a code ,in which i invoke the local webserver in back ground ,then open URL and access the web page. below is my code. I am able to invoke and kill the local webserver in seperate python script,but when i club opening of browser and and subprocess , my like below ,then my script is not respo

Re: Saving a page loaded using the webbrowser library?

2010-03-25 Thread Irmen de Jong
On 3/25/10 8:41 AM, Dr. Benjamin David Clarke wrote: Does anyone know of a way to save the a loaded web page to file after opening it with a webbrowser.open() call? Specifically, what I want to do is get the raw HTML from a web page. This web page uses Javascript. I need the resulting HTML after

Saving a page loaded using the webbrowser library?

2010-03-25 Thread Dr. Benjamin David Clarke
Does anyone know of a way to save the a loaded web page to file after opening it with a webbrowser.open() call? Specifically, what I want to do is get the raw HTML from a web page. This web page uses Javascript. I need the resulting HTML after the Javascript has been run. I've seen a lot about try

Re: Can CleintForm work with webbrowser?

2009-03-01 Thread Diez B. Roggisch
Muddy Coder schrieb: Hi Folks, ClientForm is cool at grabbing and parsing stuff from server, I like it. After the stuff parsed, and even filled values for the Controls, I popped up an idea of displaying what I had done with webbrowser. Look at the code: import ClientForm import urllib2 import

Re: Can CleintForm work with webbrowser?

2009-03-01 Thread Chris Rebert
On Sun, Mar 1, 2009 at 9:36 PM, Muddy Coder wrote: > Hi Folks, > > ClientForm is cool at grabbing and parsing stuff from server, I like > it. After the stuff parsed, and even filled values for the Controls, I > popped up an idea of displaying what I had done with webbrowser. Loo

Can CleintForm work with webbrowser?

2009-03-01 Thread Muddy Coder
Hi Folks, ClientForm is cool at grabbing and parsing stuff from server, I like it. After the stuff parsed, and even filled values for the Controls, I popped up an idea of displaying what I had done with webbrowser. Look at the code: import ClientForm import urllib2 import webbrowser request

Re: Can webbrowser module get source code?

2009-01-24 Thread Benjamin Peterson
Muddy Coder yahoo.com> writes: > I want to go > further: to get the source code of the webpage being displayed. Is it > possible to do it? I tried webbrow.get() but didn't work. Somebody can > help? Thanks! To do this, you actually need to fetch the page yourself: import urllib2 page_source = ur

Can webbrowser module get source code?

2009-01-24 Thread Muddy Coder
Hi All, I played the demo of webbrowser module, with the code below: import webbrowser url = 'https://login.yahoo.com' webbrowser.open_new_tab(url) when I ran the code, it popped out a webpage nicely. I want to go further: to get the source code of the webpage being displayed. Is it p

Re: webbrowser fragment identifier

2008-09-19 Thread Gabriel Genellina
En Thu, 18 Sep 2008 21:53:22 -0300, scottbvfx <[EMAIL PROTECTED]> escribió: I'm trying to launch a web browser along with an html file with a fragment identifier in its path. I'm using the webbrowser module for this. ie. webbrowser.open('file:///C:/myfile.html#SomeEntry

Re: webbrowser fragment identifier

2008-09-19 Thread Tim Golden
scottbvfx wrote: Hi, I'm trying to launch a web browser along with an html file with a fragment identifier in its path. I'm using the webbrowser module for this. ie. webbrowser.open('file:///C:/myfile.html#SomeEntryInTheHTML') for some reason it is truncating th

webbrowser fragment identifier

2008-09-18 Thread scottbvfx
Hi, I'm trying to launch a web browser along with an html file with a fragment identifier in its path. I'm using the webbrowser module for this. ie. webbrowser.open('file:///C:/myfile.html#SomeEntryInTheHTML') for some reason it is truncating the path to 'file:///C:/m

Re: webbrowser

2007-11-14 Thread Antonio Ceballos
lorer and Firefox. However, when I upload the script > to a remote server, it does not. A 500 Internal Server Error is displayed > on the browser. > > The (simplified) piece of code is as follows: > > import webbrowser > webbrowser.open_new(http://www.google.com) > &g

Re: webbrowser

2007-11-13 Thread Cameron Walsh
the error. > > The (simplified) piece of code is as follows: > > import webbrowser > webbrowser.open_new(http://www.google.com) try: webbrowser.open_new("http://www.google.com";) instead. But the main problem is that you cannot make a web client open their browser. Wha

webbrowser

2007-11-13 Thread Antonio Ceballos
displayed on the browser. The (simplified) piece of code is as follows: import webbrowser webbrowser.open_new(http://www.google.com) The server runs python 2.3. I am using python 2.5 in my localhost. Can anybody figure out why this may be happening? Cheers, Antonio -- http://mail.python.org

Re: webbrowser module bug?

2007-05-26 Thread Ron Adam
inced > that it would be satisfactory. What happens if you try and open an > HTML file, in the file browser or some other application which uses > the desktop preferences, where the filename contains spaces? I'm not sure how to test this. Most things I can think of call the web brows

Re: webbrowser module bug?

2007-05-25 Thread Paul Boddie
Ron Adam wrote: > > Reseting the default browser with the gnome default application window > confirmed this. The browser selection can either have the quotes around > the args "%s" paremteter, or not depending on how and what sets it. > > Seems to me it should be quoted unless spaces in path names

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Ron Adam wrote: > Got it. > > It looks like the problem started when I told firefox to make itself > the default browser. That changed the way webbrowser.py figured out the > browser to use. So instead of trying them in order, it asked the gnome > configure tool for it. > > def register

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Ron Adam wrote: > Paul Boddie wrote: >> On 25 May, 00:03, Ron Adam <[EMAIL PROTECTED]> wrote: >>> Is anyone else having problems with the webbrowser module? >>> >>> Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) >>> [GCC 4.1.2 (Ubuntu 4.1

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Paul Boddie wrote: > On 25 May, 00:03, Ron Adam <[EMAIL PROTECTED]> wrote: >> Is anyone else having problems with the webbrowser module? >> >> Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) >> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 >> Type &qu

Re: webbrowser module bug?

2007-05-25 Thread Paul Boddie
On 25 May, 00:03, Ron Adam <[EMAIL PROTECTED]> wrote: > Is anyone else having problems with the webbrowser module? > > Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) > [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 > Type "help", "copyright", &q

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Steve Holden wrote: > Ron Adam wrote: >> [EMAIL PROTECTED] wrote: >>> On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: >>>> Is anyone else having problems with the webbrowser module? >>>> >>>> Python 2.5.1c1 (release25-maint, A

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Brian van den Broek wrote: > Ron Adam said unto the world upon 05/25/2007 12:28 PM: >> [EMAIL PROTECTED] wrote: >>> On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: >>>> Is anyone else having problems with the webbrowser module? >>>> >>

Re: webbrowser module bug?

2007-05-25 Thread Brian van den Broek
Ron Adam said unto the world upon 05/25/2007 12:28 PM: > [EMAIL PROTECTED] wrote: >> On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: >>> Is anyone else having problems with the webbrowser module? >>> >>> Python 2.5.1c1 (release25-maint, Apr 12 20

Re: webbrowser module bug?

2007-05-25 Thread Steve Holden
Ron Adam wrote: > [EMAIL PROTECTED] wrote: >> On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: >>> Is anyone else having problems with the webbrowser module? >>> >>> Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) >>> [GCC 4.1.

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
[EMAIL PROTECTED] wrote: > On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: >> Is anyone else having problems with the webbrowser module? >> >> Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) >> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 >>

Re: webbrowser module bug?

2007-05-25 Thread kyosohma
On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: > Is anyone else having problems with the webbrowser module? > > Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) > [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 > Type "help", "copyright", &q

webbrowser module bug?

2007-05-24 Thread Ron Adam
Is anyone else having problems with the webbrowser module? Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>

Vista: webbrowser module

2007-05-15 Thread Norman Lorrain
I don't have a Vista machine to test this on, but I have users reporting a problem with the following e.g. import webbrowser webbrowser.open('http://www.google.com') File "webbrowser.pyc", line 43, in open File "webbrowser.pyc", line 250, in open ex

Re: WebBrowser: How to cast the document object

2007-05-06 Thread Roger Upole
"zdp" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, all, > > My project is based on wxPython, and I need an IE control (i.e. > WebBrowser ActiveX control). Although the wxPython implements a > wrapped version (wx.lib.iewin.IEHtmlWindow), but i

WebBrowser: How to cast the document object

2007-05-06 Thread zdp
Hi, all, My project is based on wxPython, and I need an IE control (i.e. WebBrowser ActiveX control). Although the wxPython implements a wrapped version (wx.lib.iewin.IEHtmlWindow), but it doesn't meet all my demands, because I need to custom many behaviors of the control. So I thought I s

Re: webbrowser module's Firefox support

2006-09-24 Thread Dustan
> > This is a bug, and has now been fixed in SVN. As a workaround, you can > edit the webbrowser.py file and remove the close_fds and preexec_fn arguments > to Popen. > > Georg Finally! It's working. Thank you so much! -- http://mail.python.org/mailman/listinfo/python-list

Re: webbrowser module's Firefox support

2006-09-24 Thread Georg Brandl
Dustan wrote: > MonkeeSage wrote: >> Dustan wrote: >> > I did do a search here, but came up empty-handed. Can anyone tell me >> > how to get the webbrowser module to recognize firefox's existence, >> > given this information? >> >>

Re: webbrowser module's Firefox support

2006-09-23 Thread Dustan
MonkeeSage wrote: > Dustan wrote: > > That didn't work either. > > Well, I'm out of ideas. It's also odd that it was being read as > webbrowser.BackgroundBrowser...whatever that is! It should have been > webbrowser.Mozilla. Thanks anyway; you have helped me tremendously. I'm sure I'll get somewhe

Re: webbrowser module's Firefox support

2006-09-23 Thread MonkeeSage
Dustan wrote: > That didn't work either. Well, I'm out of ideas. It's also odd that it was being read as webbrowser.BackgroundBrowser...whatever that is! It should have been webbrowser.Mozilla. > Another thing: your fix is only temporary. Is there a way to make it > work even after I close IDLE?

Re: webbrowser module's Firefox support

2006-09-23 Thread Dustan
MonkeeSage wrote: > Dustan wrote: > > >>> cont=webbrowser._browsers['firefox'][1] > > Why not use the api? cont=webbrowser.get('firefox') That didn't work either. > > ValueError: close_fds is not supported on Windows platforms >

Re: webbrowser module's Firefox support

2006-09-23 Thread MonkeeSage
Dustan wrote: > >>> cont=webbrowser._browsers['firefox'][1] Why not use the api? cont=webbrowser.get('firefox') > ValueError: close_fds is not supported on Windows platforms > > Looking in the docs on subprocess.Popopen > (http://docs.python.org/lib/no

Re: webbrowser module's Firefox support

2006-09-23 Thread Dustan
MonkeeSage wrote: > Dustan wrote: > > I did do a search here, but came up empty-handed. Can anyone tell me > > how to get the webbrowser module to recognize firefox's existence, > > given this information? > > Looks like it is checking %PATH% for fir

Re: webbrowser module's Firefox support

2006-09-23 Thread MonkeeSage
Dustan wrote: > I did do a search here, but came up empty-handed. Can anyone tell me > how to get the webbrowser module to recognize firefox's existence, > given this information? Looks like it is checking %PATH% for firefox.exe. Try: >>> import os >>> os.envi

webbrowser module's Firefox support

2006-09-23 Thread Dustan
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 havi

Re: Webbrowser written totally in Python

2006-09-17 Thread Franz Steinhaeusler
faulkner wrote: [source] Hi faulkner, thank you very much, I should have known! ;) It is a beginning after all. > # > there are also python bindings for gtkmozembed in gnome-python-extras > and here: > http://sourceforge.net/projects/pygtkmoz > I will take a look. -- http://ma

Re: Webbrowser written totally in Python

2006-09-17 Thread faulkner
# there are also python bindings for gtkmozembed in gnome-python-extras and here: http://sourceforge.net/projects/pygtkmoz Franz Steinhaeusler wrote: > Hello NG, > > is there any (GUI) webbrowser written completly in Python? > > in pyGtk, pyQt, wxPython or TkInter? > >

Re: Webbrowser written totally in Python

2006-09-17 Thread Lawrence Oluyede
Franz Steinhaeusler <[EMAIL PROTECTED]> wrote: > is there any (GUI) webbrowser written completly in Python? AFAIK Grail is the only attempt but it's _very_ old: http://grail.sourceforge.net/ Made in Python, Tkinter and supports HTML 2.0 (3.2 partially) -- Lawrence - http://www.ol

Webbrowser written totally in Python

2006-09-17 Thread Franz Steinhaeusler
Hello NG, is there any (GUI) webbrowser written completly in Python? in pyGtk, pyQt, wxPython or TkInter? -- Franz Steinhaeusler -- http://mail.python.org/mailman/listinfo/python-list

Re: webbrowser open failing

2006-07-26 Thread Thomas
rs Thomas On 26/07/2006, at 6:39 PM, John McMonagle wrote: > On Wed, 2006-07-26 at 17:09 +1200, Thomas wrote: >> Hi all, >> >> I am getting an error using webbrowser open on mac 10.3 using python >> 2.3.5 >> >>>>> test=open("/Volumes/TINTZ;P

Re: webbrowser open failing

2006-07-26 Thread John McMonagle
On Wed, 2006-07-26 at 17:09 +1200, Thomas wrote: > Hi all, > > I am getting an error using webbrowser open on mac 10.3 using python > 2.3.5 > > >>> test=open("/Volumes/TINTZ;P3/DT Hot Folder > test/Justin_Test.pDF","r") > >>>

webbrowser open failing

2006-07-25 Thread Thomas
Hi all, I am getting an error using webbrowser open on mac 10.3 using python 2.3.5 >>> test=open("/Volumes/TINTZ;P3/DT Hot Folder test/Justin_Test.pDF","r") >>> type(test) >>> webbrowser.open("/Volumes/TINTZ;P3/DT Hot Folder test/Ju

webbrowser problems

2006-05-30 Thread Keith Lackey
I’m having trouble trying to pass arguments to a file path url… ie c:/testPython/test.html?testArg=testValue   import webbrowser   webbrowser.open(“c:/testPython/test.html”) # Works webbrowser.open(“c:/testPython/test.html?testArg=testValue”) # Doesn’t Work   webbrowser.get

webbrowser module bug on os x?

2006-05-25 Thread robin
hi it seems to me like the webbrowser command webbrowser.open('http://www...', new=0) does not work as advertised: all the urls open in seperate windows regardless of the default browser (safari, firefox, mozilla). i do not have this problem on windows... can anyone help? thank you

module webbrowser - open link in same window - osx

2006-05-18 Thread robin
hi, i'm using the webbrowser module to open url's in safari or firefox. specifically i'm using the webbrowser.open('http://...', new=0) command. however, even though i say new=0 my url is always opened in a new browser window. what can i do, so my link is opened in an al

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-02 Thread Blair P. Houghton
Blair P. Houghton wrote: > Which makes it no security hole at > all, it would seem... Well, no, that's a little strong. No *new* security hole, maybe. It would be on the order of having ./ in the PATH for root, and getting trapped by a hacker who named his rootkit "ls" or "pwd". I.e., it puts

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-02 Thread Blair P. Houghton
Peter Hansen wrote: > It appears the correct approach might be something along the lines of > reading the registry to find what application is configured for the > "HTTP" protocol (HKCR->HTTP->shell->open->command) and run that, passing > it the URL. I think that would do what most people expect,

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-02 Thread Fuzzyman
Peter Hansen wrote: > Fuzzyman wrote: > > Blair P. Houghton wrote: > >>webbrowser.py module's handling of http:// accesses > >>is definitely different from its handling of file:// accesses. > > > > It's worth working out if this is down to webbrowser.py *or* Firefox. > > Try launching firefox wi

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-02 Thread Peter Hansen
Fuzzyman wrote: > Blair P. Houghton wrote: >>webbrowser.py module's handling of http:// accesses >>is definitely different from its handling of file:// accesses. > > It's worth working out if this is down to webbrowser.py *or* Firefox. > Try launching firefox with the path to the py file and see

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-02 Thread Fuzzyman
Blair P. Houghton wrote: > >Would it be sufficient in your case merely to allow only .html files to > >be loaded? Or URLs without .extensions? Or even just permit only the > >http: protocol? > > Personally, I'm just noodling around with this right now. > So "my case" is the abstract case. I thi

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-01 Thread Blair P. Houghton
>Would it be sufficient in your case merely to allow only .html files to >be loaded? Or URLs without .extensions? Or even just permit only the >http: protocol? Personally, I'm just noodling around with this right now. So "my case" is the abstract case. I think the solution if one was needed wou

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Bengt Richter
hat is exposed through an >existing Python library. My interest is in making the desktop module a >useful successor to webbrowser: > >http://www.python.org/pypi/desktop > >Of course, since desktop.open leaves the exact meaning of "to open" to >the user's desktop con

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Peter Hansen
Bengt Richter wrote: > How about finding the browser via .html association and then letting that > handle the url? E.g., slong the lines of > > >>> import os > >>> ft = os.popen('assoc .html').read().split('=',1)[1].strip() > >>> ft > 'MozillaHTML' > >>> os.popen('ftype %s'%ft).read().split('

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Paul Boddie
dn't mind knowing if os.startfile is the best way to open resources on Windows, and whether there's a meaningful distinction between opening and editing resources that is exposed through an existing Python library. My interest is in making the desktop module a useful successor to webbrowse

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Bengt Richter
d expect either. My Firefox certainly isn't configured to run >.py scripts even when invoked with the "file:" protocol, so webbrowser >is almost certainly Doing Bad Things on Windows. > >The relevant code from webbrowser.py shows this, confirming FuzzyMan's >su

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread olsongt
Http protocol give the content-type in the http headers, so the originating server determines how your browser is going to handle it, not the client browser. I think the problem is that the 'file://' protocol probably does use the registry keys above since it's not getting any HTTP headers. -- h

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Peter Hansen
Peter Hansen wrote: > I'd agree. I suspect this ought to be reported as a security flaw, > though it would be nice to know what the fix should be before doing so. > Anyone know a more suitable approach on Windows than just passing > things off to startfile()? It appears the correct approach mi

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Peter Hansen
Blair P. Houghton wrote: > I'm going to try it out on a remote server later today. Don't bother. I've confirmed the behaviour you saw, and that it is not what I'd expect either. My Firefox certainly isn't configured to run .py scripts even when invoked with the &qu

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Blair P. Houghton
Sorry...should read: "I did use the script to fetch remote HTML (url='http://www.python.org') before I tried the local file, and it opened the webpage in Firefox." Too many chars, too few fingers. --Blair -- http://mail.python.org/mailman/listinfo/python-list

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Blair P. Houghton
I'm going to try it out on a remote server later today. I did use this script to fetch remote HTML (url='http://www.python.org') before I tired the remote file, and it opened the webpage in Firefox. I may also try to poke around in webbrowser.py, if possible, to see if I can see whether it's sele

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread [EMAIL PROTECTED]
Does that only happen when you open file:// urls? You already have local access from Python, so it'd be more concerning if it happened with Python files on remote servers. - Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Fuzzyman
It sounds like you're running on windows *and* that webbrowser.py just uses ``os.startfile``. For html files (associated with your default browser) this will *do the right thing*. For everything else, it will *do the wrong thing*. I could well be wrong though... All the best, Fuzzyman http://w

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Peter Hansen
Blair P. Houghton wrote: > I was messing around with the webbrowser module and decided it was > pretty cool to have the browser open a URL from within a python script, > so I wrote a short script to open a local file the same way, using the > script file as an example target: &g

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-29 Thread Blair P. Houghton
Oh, uh, Python version 2.4.2, in case you're wondering. --Blair -- http://mail.python.org/mailman/listinfo/python-list

webbrowser module + urls ending in .py = a security hole?

2006-01-29 Thread Blair P. Houghton
I'm just learning Python, so bear with. I was messing around with the webbrowser module and decided it was pretty cool to have the browser open a URL from within a python script, so I wrote a short script to open a local file the same way, using the script file as an example target: # br

Re: Firefox bug in webbrowser module on Ubuntu?!

2006-01-22 Thread Jarek Zgoda
Paul Boddie napisał(a): > There are certain ways to override the autodetection in use within that > module, and a DESKTOP_LAUNCH environment variable can also be set to > configure its behaviour further. Unfortunately, attempts to confirm the > standardisation status of that variable failed to cut

Re: Firefox bug in webbrowser module on Ubuntu?!

2006-01-21 Thread SPE - Stani's Python Editor
This seems ok... >>> import webbrowser >>> webbrowser._iscommand("firefox") True >>> webbrowser.register("firefox",None,webbrowser.Netscape("firefox")) >>> webbrowser._browsers {'galeon': [None, ], 'firefox': [

Re: Firefox bug in webbrowser module on Ubuntu?!

2006-01-21 Thread skip
ncf> This section is the cause of the problem: ncf> for browser in ("mozilla-firefox", "mozilla-firebird", ncf> "mozilla", "netscape"): ncf> if _iscommand(browser): ncf> register(browser, None, Netscape(browser)) In S

Re: Firefox bug in webbrowser module on Ubuntu?!

2006-01-20 Thread ncf
x27;s trying to load "mozilla-firefox" as the exec name instead of simply "firefox". A potential workaround *might* be to do this: import webbrowser if webbrowser._iscommand("firefox"): webbrowser.register("firefox", None, Netscape("firefox")

Re: Firefox bug in webbrowser module on Ubuntu?!

2006-01-20 Thread Paul Boddie
SPE - Stani's Python Editor wrote: > > 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("

Firefox bug in webbrowser module on Ubuntu?!

2006-01-20 Thread SPE - Stani's Python Editor
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

Re: control webbrowser remotely?

2005-11-05 Thread Diez B. Roggisch
Martin Bless wrote: > Web browsers like Firefox have really cool abilities nowadays. Objects > in the current document can be addressed and manipulated by > Javascript. Not very comfortable and not easy to debug. > > Q: Is there a way to reach objects in the document from Python? > That would be c

  1   2   >