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
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
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
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
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
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
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
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
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
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"
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"
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.
>
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
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
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
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
[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 "
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.
>
"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
>
> 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
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
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
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?
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
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,
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
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
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
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
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
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
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
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
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,
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
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
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
>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
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
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('
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
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
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
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
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
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
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
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
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
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
Oh, uh, Python version 2.4.2, in case you're wondering.
--Blair
--
http://mail.python.org/mailman/listinfo/python-list
"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.
(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
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
"M.E.Farmer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I played around with it.
>
> import pythoncom
> from win32com.client import Dispatch
>
###
I played around with it.
import pythoncom
from win32com.client import Dispatch
def webbrowser(url=None):
ie = pythoncom.CoCreateInstance("Int
Awesome! works perfectly on win2k -> I.E 6
Python makes COM almost readable ;)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
><[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
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
>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
60 matches
Mail list logo