Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Python Programming Language

which "GUI module" you suggest me to use?


Hi to all...

I'm actually using Tkinter for my GUI... but I need to "put a piece of a
web-page in a widget" how can I do?

which GUI module do you suggest me to use for do that?

or which GUI module do you suggest me to use at all?

I'm acutally using Windows Xp but I also use Linux...

I know that WxPython work only under Windows and PyGTK work only under
Linux... there's some other modules?

Hi!

Only under Win: PLUIE  (http://ponx.org/ponx/guie)
This GUI is natively HTML.

--
@-salutations

Michel Claveau

On Jun 5, 2:57 pm, ZioMiP <m@fastwebnet.it> wrote:

> Hi to all...

> I'm actually using Tkinter for my GUI... but I need to "put a piece of a
> web-page in a widget" how can I do?

> which GUI module do you suggest me to use for do that?

> or which GUI module do you suggest me to use at all?

> I'm acutally using Windows Xp but I also use Linux...

> I know that WxPython work only under Windows and PyGTK work only under
> Linux... there's some other modules?

Maybe you can try Tkhtml.  It supports both Windows and Linux.

Simon

> I know that WxPython work only under Windows

Hmm, there seems to be some disparity between what you know and the
truth...

WxPython works everywhere (Windows, Linux, MacOS), and it works well.
Also, it has web widgets that come standard (wx.html.HtmlWindow).

Matt

Matimus ha scritto:

>> I know that WxPython work only under Windows

> Hmm, there seems to be some disparity between what you know and the
> truth...

> WxPython works everywhere (Windows, Linux, MacOS), and it works well.
> Also, it has web widgets that come standard (wx.html.HtmlWindow).

> Matt

Thanks for this ^_^ so I think I'll try to migrate to wx

ZioMiP je napisao/la:

> Hi to all...

> I'm actually using Tkinter for my GUI... but I need to "put a piece of a
> web-page in a widget" how can I do?

> which GUI module do you suggest me to use for do that?

> or which GUI module do you suggest me to use at all?

> I'm acutally using Windows Xp but I also use Linux...

> I know that WxPython work only under Windows and PyGTK work only under
> Linux... there's some other modules?

have you considered using qt, i.e., pyqt, pyqwt? unlike wx, qt draws
its own icons...
In article <p%k9i.8712$BU3.5@tornado.fastwebnet.it>,

ZioMiP  <m@fastwebnet.it> wrote:
>Hi to all...

>I'm actually using Tkinter for my GUI... but I need to "put a piece of a
>web-page in a widget" how can I do?

>which GUI module do you suggest me to use for do that?

>or which GUI module do you suggest me to use at all?

>I'm acutally using Windows Xp but I also use Linux...

>I know that WxPython work only under Windows and PyGTK work only under
>Linux... there's some other modules?

?  wxPython is available for Linux and Mac OS X.  PyGTK is
available for Windows.

Apparently you want to embed Web content in a Tkinter widget.
There are several ways to do this.  Do you need a live browser,
or is it enough to render HTML?

Cameron Laird ha scritto:

I think is like a "live browser"... not only render HTML because the
webpage got a bit of javascript inside...
On 2007-06-05, ZioMiP <m@fastwebnet.it> wrote:

> I know that WxPython work only under Windows and PyGTK work only under
> Linux...

You 'know' wrong.  

wxPython works fine under Windows, Linux and OSX.

PyGTK works under Linux and Windows, but doens't use native
widgets under Windows, so it won't look like a "normal" windows
app.

> there's some other modules?

PyQt

--
Grant Edwards                   grante             Yow! Xerox your lunch
                                  at               and file it under "sex
                               visi.com            offenders"!

On Jun 5, 4:17 pm, ZioMiP <m@fastwebnet.it> wrote:

Is this webpage untouchable, or is HTML rendering just a shortcut to
avoid redesigning part of the app? If you need faithful rendering of
an arbitrary webpage along with a Javascript runtime, that's a bigger
issue, and you might want to look at some of the Mozilla tools,
particularly XULRunner:

http://developer.mozilla.org/en/docs/Building_XULRunner_with_Python

Otherwise, wxPython's HTML widget or TkHtml should be fine -- your
code will probably be easier to maintain and debug if you translate
that bit of Javascript to Python (language constructs are similar,
especially with xml.dom.minidom).

On Jun 6, 12:13 pm, Eric <eric.talev@gmail.com> wrote:

You could also consider the use of Crunchy, and use the web page AS
the GUI.

-T

In article <1181082196.630888.161@w5g2000hsg.googlegroups.com>,

This completely loses me; what do you mean by "draw its own icon",
and what does that have to do with rendering Web pages?
ZioMiP a crit :
...

> I think is like a "live browser"... not only render HTML because the
> webpage got a bit of javascript inside...

Does the rendering absolutely need to be in your own GUI ?

Else you can use the *webbrowser* module and simply call user preffered
browser to display data and run javascript. Less integrated, simpler to
setup.

Laurent.

ok ok , thanks to everybody ^_^

This HTML page that I need to put in my GUI is a little page with
JavaScript that run something like banners...

not gif or animated gif... but text... text randomly choosen by a
database that I can't control...

so, I need to put this "piece of browser" for looking the page and let
it do the rest...

> This completely loses me; what do you mean by "draw its own icon",
> and what does that have to do with rendering Web pages?

maybe "draw its own icons" wasn't the best (or the most accurate way)
of putting it. what i meant by that is this (from wikipedia):

"Qt uses its own paint engine and controls. This makes the work of
porting to other platforms easier because very few classes in Qt
depended on the target platform. Qt used to emulate the native look of
its intended platforms, which occasionally led to slight discrepancies
where that emulation wasn't perfect. This, however, no longer applies
because the latest versions of Qt use the native styles API of the
different platforms to draw the Qt controls."

what does that have to do with rendering web pages? have no idea. i
just wanted to point out the main difference between qt and wx that he
should be aware of.

On Wed, 06 Jun 2007 00:22:40 +0000, Grant Edwards wrote:
>> I know that WxPython work only under Windows and PyGTK work only under
>> Linux...

> You 'know' wrong.

> wxPython works fine under Windows, Linux and OSX.

wxPython emulates Gtk (though using some native widgets, it also uses
some of its own) and in many cases it looks non-native compared to Gtk.
If your target platform includes Unix systems, you'll have to decide
whether inconsistencies with the look and feel of the desktop are an
issue for you.

> PyGTK works under Linux and Windows, but doens't use native widgets
> under Windows, so it won't look like a "normal" windows app.

Gtk on Win32 can be themed to looked like Windows, AFAIK the Win32
installer does this by default since a couple of months.

-Samuel

ZioMiP wrote:
> I know that WxPython work only under Windows

WxPython works everywhere for me. I have some screenshots from Windows
98 - Vista, Mac OSX, and Debian GNU/Linux... all running the exact same
Python & wxPython code:

http://filebox.vt.edu/users/rtilley/public/find_ssns/index.html

On 2007-06-06, Samuel <newsgro@debain.org> wrote:

> On Wed, 06 Jun 2007 00:22:40 +0000, Grant Edwards wrote:

>>> I know that WxPython work only under Windows and PyGTK work only under
>>> Linux...

>> You 'know' wrong.

>> wxPython works fine under Windows, Linux and OSX.

> wxPython emulates Gtk

What?  On some platforms (Linux), wxPython _uses_ Gtk. I don't
see how you could say it emulates it.

> (though using some native widgets, it also uses some of its
> own) and in many cases it looks non-native compared to Gtk.

How can that be the case when wxPython is using Gtk?

> If your target platform includes Unix systems, you'll have to
> decide whether inconsistencies with the look and feel of the
> desktop are an issue for you.

wxPython looks completely native on Unix, because it's using a
native widget set (Gtk).

>> PyGTK works under Linux and Windows, but doens't use native widgets
>> under Windows, so it won't look like a "normal" windows app.

> Gtk on Win32 can be themed to looked like Windows, AFAIK the Win32
> installer does this by default since a couple of months.

That's good to know.

--
Grant Edwards                   grante             Yow! Hello?  Enema Bondage?
                                  at               I'm calling because I want
                               visi.com            to be happy, I guess ...

On 6/6/07, Samuel <newsgro@debain.org> wrote:

> On Wed, 06 Jun 2007 00:22:40 +0000, Grant Edwards wrote:

> >> I know that WxPython work only under Windows and PyGTK work only under
> >> Linux...

> > You 'know' wrong.

> > wxPython works fine under Windows, Linux and OSX.

> wxPython emulates Gtk (though using some native widgets, it also uses
> some of its own) and in many cases it looks non-native compared to Gtk.
> If your target platform includes Unix systems, you'll have to decide
> whether inconsistencies with the look and feel of the desktop are an
> issue for you.

In the general case, wxWidgets wraps (not emulates) Gtk. I don't
believe that there are any common controls left which are still
emulated (maybe the list control? I'm not sure - I don't follow the
bleeding edge of wx anymore).

wxPython (as opposed to wxWidgets, the C++ core) has a sizeable
library of custom controls as part of its standard lib. Most of these
are owner-drawn for various reasons and often won't appear native
(Andrea Gavin, probably the most prolific custom control author, works
primarily on Windows).

> > PyGTK works under Linux and Windows, but doens't use native widgets
> > under Windows, so it won't look like a "normal" windows app.

> Gtk on Win32 can be themed to looked like Windows, AFAIK the Win32
> installer does this by default since a couple of months.

That stretches the truth rather significantly. While the win32 theme
does use the windows theme apis for drawing, it still has slightly
different colors (especially window backgrounds and menus), and (more
importantly) vastly and notably different behavior. Shortcuts are
different, renderings are different, the Gtk drawing model is used
instead of the windows one (leads to quite jarring repainting
differences), different fonts, etc, etc. It looks okay in a screenshot
but is clearly non-native and foreign in use.

On Wed, 06 Jun 2007 14:43:35 +0000, Grant Edwards wrote:
> On 2007-06-06, Samuel <newsgro@debain.org> wrote:
>> On Wed, 06 Jun 2007 00:22:40 +0000, Grant Edwards wrote:
>>> wxPython works fine under Windows, Linux and OSX.

>> wxPython emulates Gtk

> What?  On some platforms (Linux), wxPython _uses_ Gtk. I don't see how
> you could say it emulates it.

That may be true in some cases, but in fact, most widgets show some sort
of difference. Take for example the HPaned - it looks totally different
(the slider is a lot slimmer, plus moving it makes a line appear. The
behavior is different as well).

Even simple widgets show differences. Try triple-clicking into entry
boxes, it's different from Gtk.

>> (though using some native widgets, it also uses some of its own) and in
>> many cases it looks non-native compared to Gtk.

> How can that be the case when wxPython is using Gtk?

Obviously, it does *not* always use Gtk.

>> If your target platform includes Unix systems, you'll have to decide
>> whether inconsistencies with the look and feel of the desktop are an
>> issue for you.

> wxPython looks completely native on Unix, because it's using a native
> widget set (Gtk).

Same as above.

-Samuel

On 6/6/07, Samuel <newsgro@debain.org> wrote:

I'm not familiar with any wxPython control called HPaned. There's a
couple different types of splitter, the Gtk native one is
wxSplitterWindow. The others are owner drawn with better or worse
native appearance. Splitters are one of those things where everyone
writes their own, like web frameworks.

> Even simple widgets show differences. Try triple-clicking into entry
> boxes, it's different from Gtk.

Text boxes are absolutely native controls under gtk.

> >> (though using some native widgets, it also uses some of its own) and in
> >> many cases it looks non-native compared to Gtk.

> > How can that be the case when wxPython is using Gtk?

> Obviously, it does *not* always use Gtk.

It *always* uses Gtk. Some people write or use custom controls, which
may or may not have gtk native analogs. This isn't any different than
using pygtk and writing custom widgets.

On Wed, 06 Jun 2007 09:45:48 -0500, Chris Mellon wrote:
> On 6/6/07, Samuel <newsgro@debain.org> wrote:
> In the general case, wxWidgets wraps (not emulates) Gtk. I don't believe
> that there are any common controls left which are still emulated (maybe
> the list control? I'm not sure - I don't follow the bleeding edge of wx
> anymore).

See my other response. Also, the fact that Gtk widgets are used does not
necessarily mean that the behavior is the same - you can still do all
kinds of weird stuff by hooking into the callbacks. Some of the
differences to Gtk were probably introduced to wx in order to have more
consistent behavior over different platforms.

> wxPython (as opposed to wxWidgets, the C++ core) has a sizeable library
> of custom controls as part of its standard lib. Most of these are
> owner-drawn for various reasons and often won't appear native (Andrea
> Gavin, probably the most prolific custom control author, works primarily
> on Windows).

This affects the C++ core as well. aMule (which is written in CPP) is one
particular complex example that exposes many of those problems when used
on Linux.

>> > PyGTK works under Linux and Windows, but doens't use native widgets
>> > under Windows, so it won't look like a "normal" windows app.

>> Gtk on Win32 can be themed to looked like Windows, AFAIK the Win32
>> installer does this by default since a couple of months.

> That stretches the truth rather significantly. While the win32 theme
> does use the windows theme apis for drawing, it still has slightly
> different colors (especially window backgrounds and menus), and (more
> importantly) vastly and notably different behavior.

Well, I have only tried Gaim on windows and could not tell the
difference. But then, I am not a regular Windows user.

> Shortcuts are
> different, renderings are different, the Gtk drawing model is used
> instead of the windows one (leads to quite jarring repainting
> differences), different fonts, etc, etc. It looks okay in a screenshot
> but is clearly non-native and foreign in use.

Sounds bad. It also sounds much like what I experienced with wx on Linux.

I guess there is no perfect solution, you always have to target one
primary platform. (Well, there's SWT, but the Gtk emulation too has it's
drawbacks...)

-Samuel

On 6/6/07, Samuel <newsgro@debain.org> wrote:

> On Wed, 06 Jun 2007 09:45:48 -0500, Chris Mellon wrote:

> > On 6/6/07, Samuel <newsgro@debain.org> wrote:
> > In the general case, wxWidgets wraps (not emulates) Gtk. I don't believe
> > that there are any common controls left which are still emulated (maybe
> > the list control? I'm not sure - I don't follow the bleeding edge of wx
> > anymore).

> See my other response. Also, the fact that Gtk widgets are used does not
> necessarily mean that the behavior is the same - you can still do all
> kinds of weird stuff by hooking into the callbacks. Some of the
> differences to Gtk were probably introduced to wx in order to have more
> consistent behavior over different platforms.

This is true and in the specific case of triple click, wx does indeed
report them to the application differently than gtk does. This
doesn't, to my knowledge, interfere with text controls that don't try
to handle the click, but it may result in inconsistent behavior with
an app that adds triple click behavior to it's own text controls.

> > wxPython (as opposed to wxWidgets, the C++ core) has a sizeable library
> > of custom controls as part of its standard lib. Most of these are
> > owner-drawn for various reasons and often won't appear native (Andrea
> > Gavin, probably the most prolific custom control author, works primarily
> > on Windows).

> This affects the C++ core as well. aMule (which is written in CPP) is one
> particular complex example that exposes many of those problems when used
> on Linux.

the aMule team makes heavy use of their own custom written controls -
issues with it are not necessarily representative of the toolkit. The
C++ core has very few controls which are entirely custom drawn, and
those are generally controls which don't exist in the native platform.

I regularly use wxGTK and wxPython under linux with gnome (it's my
sole desktop at home - I only use windows at work). The differences
are orders of magnitude in severity.

One common problem is that people use incorrect (but working on
Windows) code and don't test under linux, it can cause similar issues.
The *toolkit* is very strong on all platforms. Individual apps are
often much less strong, because relatively view developers have access
and motivation to test heavily on all platforms. wx tries to make
correct code work the same on all platforms, but it can't make
incorrect code fail the same way on all platforms.

And, of course, many people simply aren't familiar with or choose not
to use the APIs that wx provides for whatever reason. Custom controls
that don't use native fonts are fairly common, for example, even
though wx provides APIs to retrieve the correct fonts and the use of
them is encouraged - people just hardcode whatever they "know" the
right font is on their native platform.

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc