Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #34335 > unrolled thread
| Started by | inq1ltd <inq1ltd@inqvista.com> |
|---|---|
| First post | 2012-12-05 16:44 -0500 |
| Last post | 2012-12-07 11:37 -0500 |
| Articles | 8 — 4 participants |
Back to article view | Back to comp.lang.python
mini browser with python inq1ltd <inq1ltd@inqvista.com> - 2012-12-05 16:44 -0500
Re: mini browser with python John Gordon <gordon@panix.com> - 2012-12-05 22:56 +0000
Re: mini browser with python Hans Mulder <hansmu@xs4all.nl> - 2012-12-06 01:52 +0100
Re: mini browser with python inq1ltd <inq1ltd@inqvista.com> - 2012-12-06 10:32 -0500
Re: mini browser with python John Gordon <gordon@panix.com> - 2012-12-06 17:19 +0000
Re: mini browser with python inq1ltd <inq1ltd@inqvista.com> - 2012-12-06 13:15 -0500
Re: mini browser with python Terry Reedy <tjreedy@udel.edu> - 2012-12-06 15:15 -0500
Re: mini browser with python inq1ltd <inq1ltd@inqvista.com> - 2012-12-07 11:37 -0500
| From | inq1ltd <inq1ltd@inqvista.com> |
|---|---|
| Date | 2012-12-05 16:44 -0500 |
| Subject | mini browser with python |
| Message-ID | <mailman.532.1354745770.29569.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
Python help. I can connect to and download a web page, html code, and save it to a file. If connected to the web, I can change the settings on KWrite to open the file and navigate the page, (just like a browser does). I want to view the html file without using a browser or KWrite as I do now. Customer wants a direct connect to a dedicated website. Their clients can be using any browser. This gives them a a direct connect to a dedicated website for a specific purpose. In other words I need a mini, simple browser; something I can build that will open, read and display a saved html or the connected url site. I would appreciate some direction. jimonlinux
[toc] | [next] | [standalone]
| From | John Gordon <gordon@panix.com> |
|---|---|
| Date | 2012-12-05 22:56 +0000 |
| Message-ID | <k9ojfh$dos$1@reader1.panix.com> |
| In reply to | #34335 |
In <mailman.532.1354745770.29569.python-list@python.org> inq1ltd <inq1ltd@inqvista.com> writes:
> In other words I need a mini, simple browser;
> something I can build that will open, read and
> display a saved html or the connected url site.
What will be the output of this mini browser? Plain text? Rendered
graphics? An audible screen reader? Something else?
What web standards does this mini browser need to support? Full HTML5?
Partial HTML? CSS? Javascript? Flash?
--
John Gordon A is for Amy, who fell down the stairs
gordon@panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
[toc] | [prev] | [next] | [standalone]
| From | Hans Mulder <hansmu@xs4all.nl> |
|---|---|
| Date | 2012-12-06 01:52 +0100 |
| Message-ID | <50bfec3f$0$6944$e4fe514c@news2.news.xs4all.nl> |
| In reply to | #34335 |
On 5/12/12 22:44:21, inq1ltd wrote:
> I can connect to and download a web page,
> html code, and save it to a file. If connected
> to the web, I can change the settings on KWrite
> to open the file and navigate the page,
> (just like a browser does).
> I want to view the html file without using a browser
> or KWrite as I do now.
> Customer wants a direct connect to a dedicated
> website. Their clients can be using any
> browser. This gives them a a direct connect to
> a dedicated website for a specific purpose.
> In other words I need a mini, simple browser;
> something I can build that will open, read and
> display a saved html or the connected url site.
How about:
import os.path, webbrowser
webbrowser.open("file://" + os.path.abspath(your_file))
> I would appreciate some direction.
You'd get more useful answers if you'd give some
more context. For example:
* Which platform?
* Which version of Python?
* Which GUI (if any)?
* What capabilities do you need? CSS? Javascript?
* Are there any unusual requirement?
Hope this helps,
-- HansM
[toc] | [prev] | [next] | [standalone]
| From | inq1ltd <inq1ltd@inqvista.com> |
|---|---|
| Date | 2012-12-06 10:32 -0500 |
| Message-ID | <mailman.567.1354808057.29569.python-list@python.org> |
| In reply to | #34351 |
[Multipart message — attachments visible in raw view] — view raw
On Thursday, December 06, 2012 01:52:15 AM Hans Mulder
wrote:
> On 5/12/12 22:44:21, inq1ltd wrote:
> > I can connect to and download a web page,
> > html code, and save it to a file. If connected
> > to the web, I can change the settings on KWrite
> > to open the file and navigate the page,
> > (just like a browser does).
> >
> > I want to view the html file without using a browser
> >
> > or KWrite as I do now.
> >
> > Customer wants a direct connect to a dedicated
> > website. Their clients can be using any
> > browser. This gives them a a direct connect to
> > a dedicated website for a specific purpose.
> > In other words I need a mini, simple browser;
> > something I can build that will open, read and
> > display a saved html or the connected url site.
>
> How about:
>
> import os.path, webbrowser
>
> webbrowser.open("file://" + os.path.abspath(your_file))
>
> > I would appreciate some direction.
>
> You'd get more useful answers if you'd give some
> more context. For example:
>
> * Which platform?
> * Which version of Python?
> * Which GUI (if any)?
> * What capabilities do you need? CSS? Javascript?
> * Are there any unusual requirement?
>
A few responders have ask for this information.
Platform can be linux or Windows.
Currently: Linux runs Python 2.7
and Windows runs 2.6.3;
Windows can be XP and above.
My program is built with Python and Tkinter
I convert the program using py2exe.
There are no special requirements.
The client will design around my capabilities.
The html page will simply be a display of data.
Right now I need some way to display
15 to 20 lines of html in its own window or
as part of my screen.
I am trying to avoid using any commercial
browser.
GTK has a webkit, and QT has a webkit and
Suse, wich I use has libwebkitgtk-1_0-0.
All at some time I will have to look at all.
I thought If someone had done this already
The learning curve could be lowered.
Thanks for the interest,
jimonlinux
>
> Hope this helps,
>
> -- HansM
[toc] | [prev] | [next] | [standalone]
| From | John Gordon <gordon@panix.com> |
|---|---|
| Date | 2012-12-06 17:19 +0000 |
| Message-ID | <k9qk3a$94g$1@reader1.panix.com> |
| In reply to | #34398 |
In <mailman.567.1354808057.29569.python-list@python.org> inq1ltd <inq1ltd@inqvista.com> writes:
> Right now I need some way to display
> 15 to 20 lines of html in its own window or
> as part of my screen.
Could you open a shell window and run a text web browser such as Lynx?
--
John Gordon A is for Amy, who fell down the stairs
gordon@panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
[toc] | [prev] | [next] | [standalone]
| From | inq1ltd <inq1ltd@inqvista.com> |
|---|---|
| Date | 2012-12-06 13:15 -0500 |
| Message-ID | <mailman.582.1354819641.29569.python-list@python.org> |
| In reply to | #34409 |
[Multipart message — attachments visible in raw view] — view raw
On Thursday, December 06, 2012 05:19:38 PM John Gordon wrote: > In <mailman.567.1354808057.29569.python-list@python.org> inq1ltd <inq1ltd@inqvista.com> writes: > > Right now I need some way to display > > 15 to 20 lines of html in its own window or > > as part of my screen. > > Could you open a shell window and run a text web browser such as Lynx? That is a possibility but then every machine will have to have Lynx. That is not quite what the customer wants. Also, I can download the site to a file, convert the data to text, then display it in a Text widget. I appreciate the help, Regards, jimonlinux
[toc] | [prev] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2012-12-06 15:15 -0500 |
| Message-ID | <mailman.587.1354824966.29569.python-list@python.org> |
| In reply to | #34409 |
On 12/6/2012 1:15 PM, inq1ltd wrote: > On Thursday, December 06, 2012 05:19:38 PM John Gordon wrote: > > > In <mailman.567.1354808057.29569.python-list@python.org> inq1ltd > <inq1ltd@inqvista.com> writes: > > > Right now I need some way to display > > > 15 to 20 lines of html in its own window or > > > as part of my screen. > > Could you open a shell window and run a text web browser such as Lynx? > That is a possibility but then every machine > will have to have Lynx. That is not quite > what the customer wants. > Also, I can download the site to a file, Or you can download and work with it in memory. > convert the data to text, Using existing html parser. > then display it in a Text widget. The complication in displaying html is with placing images and other boxed content, including tables, and flowing text around the boxes. If the html you want to work with is simple and has a somewhat fixed format, you should be able to extract all the info as either text or a table and be able to format and place it how you want. -- Terry Jan Reedy
[toc] | [prev] | [next] | [standalone]
| From | inq1ltd <inq1ltd@inqvista.com> |
|---|---|
| Date | 2012-12-07 11:37 -0500 |
| Message-ID | <mailman.613.1354900350.29569.python-list@python.org> |
| In reply to | #34335 |
[Multipart message — attachments visible in raw view] — view raw
On Thursday, December 06, 2012 03:15:42 PM Terry Reedy wrote: > On 12/6/2012 1:15 PM, inq1ltd wrote: > > On Thursday, December 06, 2012 05:19:38 PM John Gordon wrote: > > > In <mailman.567.1354808057.29569.python- list@python.org> inq1ltd > > > > <inq1ltd@inqvista.com> writes: > > > > Right now I need some way to display > > > > 15 to 20 lines of html in its own window or > > > > as part of my screen. > > > > > > Could you open a shell window and run a text web browser such as > > > Lynx? > > > > That is a possibility but then every machine > > will have to have Lynx. That is not quite > > what the customer wants. > > > > Also, I can download the site to a file, > > Or you can download and work with it in memory. > > > convert the data to text, > > Using existing html parser. > > > then display it in a Text widget. > > The complication in displaying html is with placing images and other > boxed content, including tables, and flowing text around the boxes. If > the html you want to work with is simple and has a somewhat fixed > format, you should be able to extract all the info as either text or a > table and be able to format and place it how you want. What you are suggesting is what was suggested when this project was originally discussed. However, I was naive about the complications of simply viewing a web page. And, making something like this work on Linux and Windows. I've come to the conclusion that processing the data with a parser and formatting it in a widget is the only way to make it work on both platforms. Parsing the data also gives one the ability to produce a module that will work in multiple versions of either platform and still keep control of all of the code. I appreciate the Help, Regards, jimonlinux
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web