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

problem opening html file with webbrowser.open

hello all,
as I posted in my previous thread, I am generating html reports for my
client software.
I am yet to find a satisfactory module which can help me actually
create headings, bold and italics etc without merging html with data
variables.
any ways I am right now doing the hamd coding myself. may be I have
overlooked some module.
right now I am in the process of trying templayer.
but my main issue is that when I use the
webbrowser.open("file:///home/myname/report.html"), webbroser opens
but the page does not come up.
there is certainly some thing wrong in what I am giving to the open function.
can some one correct me?
regards,
Krishnakant.
Oct 29 '07 #1
2 2747
On 29 Okt, 11:44, "krishnakant Mane" <researchb...@gmail.comwrote:
hello all,
as I posted in my previous thread, I am generating html reports for my
client software.
I am yet to find a satisfactory module which can help me actually
create headings, bold and italics etc without merging html with data
variables.
any ways I am right now doing the hamd coding myself. may be I have
overlooked some module.
right now I am in the process of trying templayer.
This somewhat neglected Wiki page may provide some guidance:

http://wiki.python.org/moin/Templating

Dynamically styling data can be somewhat awkward, and I'd probably
have some kind of last-minute transformation on my data to add
presentation-related attributes and then feed it to a generic
templating system.
but my main issue is that when I use the
webbrowser.open("file:///home/myname/report.html"), webbroser opens
but the page does not come up.
there is certainly some thing wrong in what I am giving to the open function.
can some one correct me?
Which system and Web browser are you using? Perhaps you'd be
interested in the desktop module instead:

http://www.python.org/pypi/desktop

Paul

Oct 29 '07 #2
krishnakant Mane wrote:
as I posted in my previous thread, I am generating html reports for my
client software.
I am yet to find a satisfactory module which can help me actually
create headings, bold and italics etc without merging html with data
variables.
Maybe this is something for you:

http://codespeak.net/lxml/dev/lxmlht...-the-e-factory

but my main issue is that when I use the
webbrowser.open("file:///home/myname/report.html"), webbroser opens
but the page does not come up.
Maybe your browser is not in the executable path? Try passing the PATH
environment variable to the Python interpreter and make sure it contains the
directory where your browser is installed.

Also, try requesting a specific browser type instead of the default one, and
use its controller object. Read the docs of the webbrowser module for that:

http://docs.python.org/lib/module-webbrowser.html

Stefan
Oct 29 '07 #3

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

Similar topics

7
by: Mike | last post by:
Hi! I posted this question in browser_ctl group as well but got no results. I have a form with embedded WebBrowser. Upon clicking on a link in the embedded webbrowser that calls JavaScript's...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
9
by: Jason Boardman | last post by:
Can anyone tell me how I can write HTML to a WebBrowser control in Visual Basic 6? I want to display HTML in the browser that is generated from within my VB program (as opposed to loading it from...
0
by: Andy Chen | last post by:
Hi, I found a vbs file on the internet, it can do this job very well: ------------------ 'MakeMHT.vbs Const adSaveCreateNotExist = 1 Const adSaveCreateOverWrite = 2 Const adTypeBinary = 1...
1
by: Ben | last post by:
Hi there, Perhaps someone can help me. For some reason, when my Python script runs and loads an HTML page in a new browser window at the local host (desktop), the links to my stylesheet and all...
0
by: Johnny Jörgensen | last post by:
I'm currently doing an application in VB.NET 2005 where I need the possiblity to perform certain file tasks: 1) I've got a HTML page open in a WebBrowser control. I want the user to be...
7
by: - Electronic.HR - | last post by:
I have very strange and stupid problem with .NEt's webBrowser control... If I do this: ---------------------------------- private void btnGoogle_click(object sender, EventArgs e) { ...
1
by: Piratenaapje | last post by:
I'm currently developing a Google Reader Notifier for linux (check it out at http://grnotify.sf.net if you're interested), and need to be able to open the users default webbrowser and login to google...
1
by: heyi | last post by:
hi, i'm making an app which uses a webbrowser control to show some offline (not cache) html pages like a slide show. let's say pages in a folder on the desktop etc... when it came to testing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...

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.