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

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#SomeEntryInTheHTML') for some re

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 the path to 'file:///C:/myfile.html

Re: webbrowser

2007-11-14 Thread Antonio Ceballos
Dennis, Cameron, You are absolutely right. I was not aware that the cgi was trying to open the new browser on the server -I am a beginner with cgi, python and javascript. This simple javascript does the job perfectly: window.open("http://www.google.com";); Thanks a lot, Antonio "Antonio Ceb

Re: webbrowser

2007-11-13 Thread Cameron Walsh
Antonio Ceballos wrote: > Hello, > > I am trying to open a URL on a new browser or new tab from an HTML page > created from a python cgi script. import cgitb; cgitb.enable() # Will save you hours of debugging. Prints error messages and exceptions to the client, wrapped in pretty html. On Apa

Re: webbrowser module bug?

2007-05-26 Thread Ron Adam
Paul Boddie wrote: > 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 unl

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.2-0ubuntu4)] on linux2 >>> Type "help", "copyright"

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 "help", "copyright", "credits" or "license"

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", "credits" or "license" for more information. >

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, Apr 12 2007, 21:00:25) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] o

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? Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:2

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 2007, 21:00:25) >>> [GCC 4.1.2 (Ubuntu 4.1.2-0u

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.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 >>> Type "help", "co

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 >> Type "help", "copyright", "credits" or "

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", "credits" or "license" for more information. >

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 it doesn't meet all > my demands, be

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? >> >> Looks like it is checking %PATH% for firefox.exe. Try: >> >> >>> im

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 > > > > Looking in the docs on subprocess.Popopen > > (http://docs.py

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/node529.html), it says "If close_fds is > true,

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 firefox.exe. Try: > > >>> import os > >>> os.enviro

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.environ["PATH"] = r"C:\Program Files\Mozi

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
this was just on digg: ## import wx from urllib import urlopen import wx.html class Frame(wx.Frame): def userPageButton(self, event): goToPage=self.userPage.GetValue() goToPage='http://www.' + goToPage webpage=urlopen(goT

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.oluyede.org/blog

Re: webbrowser open failing

2006-07-26 Thread Thomas
HI Thanks for the help. I tried that , now getting a different error >>> test=open("/Volumes/TINTZ;P3/DT Hot Folder test/Justin_Test.pDF","r") >>> type(test) >>> webbrowser.open("file://Volumes/TINTZ;P3/DT Hot Folder test/Justin_Test.pDF") Traceback (most recent call last): File "", l

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") > >>> type(test) > > >>> webbrowser.open("/Volumes/TINTZ;P3/DT Hot Fo

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
On 30 Jan 2006 14:39:29 -0800, "Paul Boddie" <[EMAIL PROTECTED]> wrote: >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 tha

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
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()? I wouldn't mind knowing if os.sta

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

2006-01-30 Thread Bengt Richter
On Mon, 30 Jan 2006 16:00:25 -0500, Peter Hansen <[EMAIL PROTECTED]> wrote: >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 configur

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 "file:" protocol, so webbrowser

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: > > # browser-test.py

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

Re: webbrowser failing

2005-09-26 Thread DogWalker
"Thomas Thomas" <[EMAIL PROTECTED]> said: >Hi All, > >import webbrowser >url='http://www.cnn.com' >webbrowser.open(url) > >giving the error > >Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on win32 >Type "help", "copyright", "credits" or "license" for more information.

Re: webbrowser failing

2005-09-21 Thread Fredrik Lundh
(trying again) Thomas Thomas wrote: > import webbrowser > url='http://www.cnn.com' > webbrowser.open(url) > > giving the error > WindowsError: [Errno 2] The system cannot find the file specified: > 'http://www.cnn.com' you have a Windows install that don't understand HTTP paths, most likely be

Re: webbrowser failing

2005-09-21 Thread Fredrik Lundh
Thomas Thomas wrote: > import webbrowser > url='http://www.cnn.com' > webbrowser.open(url) > > giving the error > WindowsError: [Errno 2] The system cannot find the file specified: > 'http://www.cnn.com' So you have a Windows install that don't understand HTTP paths, most likely because you (or

Re: Webbrowser On Windows

2005-05-02 Thread J Correia
"M.E.Farmer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I played around with it. > > import pythoncom > from win32com.client import Dispatch > ###

Re: Webbrowser On Windows

2005-05-01 Thread M.E.Farmer
I played around with it. import pythoncom from win32com.client import Dispatch def webbrowser(url=None): ie = pythoncom.CoCreateInstance("Int

Re: Webbrowser On Windows

2005-05-01 Thread M.E.Farmer
Awesome! works perfectly on win2k -> I.E 6 Python makes COM almost readable ;) M.E.Farmer -- http://mail.python.org/mailman/listinfo/python-list

Re: Webbrowser On Windows

2005-05-01 Thread J Correia
><[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >It seems to me that there is no way to create a new instance of Internet >Explorer (if there are already some IE windows opened). >Does anyone know a possible solution? Or a workaround (without using >startfile, maybe?) that will force I

Re: Webbrowser On Windows

2005-05-01 Thread M.E.Farmer
Hello Andrea, I have played around for a few seconds and have a few suggestions. The code is a little baffling it appears that there is no way to do that on windows. I have looked into Internet Explorer and have found that there is an option in Internet Explorer that controls this. In Internet Exp

Re: Webbrowser On Windows

2005-05-01 Thread andrea_gavana
>It seems to me that there is no way to create a new instance of Internet >Explorer (if there are already some IE windows opened). >Does anyone know a possible solution? Or a workaround (without using >startfile, maybe?) that will force IE to create a new instance? Should I suppose no solution exi