which "GUI module" you suggest me to use?

Z

ZioMiP

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?
 
S

Simon Yau

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
 
M

Matimus

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
 
Z

ZioMiP

Matimus ha scritto:
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
 
M

montyphyton

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...
 
C

Cameron Laird

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?
 
Z

ZioMiP

Cameron Laird ha scritto:
? 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?

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

Grant Edwards

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
 
E

Eric

Cameron Laird ha scritto:






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

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).
 
C

Cameron Laird

ZioMiP je napisao/la:

have you considered using qt, i.e., pyqt, pyqwt? unlike wx, qt draws
its own icons...

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

tleeuwenburg

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).

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

-T
 
L

Laurent Pointal

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.
 
Z

ZioMiP

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...
 
M

montyphyton

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.
 
S

Samuel

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
 
G

Grant Edwards

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).
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.
 
C

Chris Mellon

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).
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.
 
S

Samuel

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.
How can that be the case when wxPython is using Gtk?

Obviously, it does *not* always use Gtk.
wxPython looks completely native on Unix, because it's using a native
widget set (Gtk).

Same as above.

-Samuel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top