[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Where's GUI for Python?

K Viltersten

3/1/2008 9:35:00 PM

I'm certain there is an API for creating
GUI's but as far i can find it in the
http://docs.python.org/tu...
the only "gui" is in "Guido".

What do i miss?

--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be lazy

13 Answers

Tim Chase

3/1/2008 10:06:00 PM

0

> I'm certain there is an API for creating
> GUI's but as far i can find it in the
> http://docs.python.org/tu...
> the only "gui" is in "Guido".
>
> What do i miss?


The batteries-included GUI:

import tkininter

Add-on solutions include wxPython, PythonCard and many others. GIYF:

http://google.com/search?q=...

-tkc


Dennis Lee Bieber

3/1/2008 10:47:00 PM

0

On Sat, 01 Mar 2008 16:05:50 -0600, Tim Chase
<python.list@tim.thechases.com> declaimed the following in
comp.lang.python:

>
> import tkininter
>
When that fails, try without the stutter <G>

import tkinter
--
Wulfraed Dennis Lee Bieber KD6MOG
wlfraed@ix.netcom.com wulfraed@bestiaria.com
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: web-asst@bestiaria.com)
HTTP://www.bestiaria.com/

K Viltersten

3/2/2008 12:43:00 AM

0

>> import tkininter
>>
> When that fails, try without the stutter <G>
>
> import tkinter


I must be doing something wrong because
neither tkinter nor tkininter works.
I tried both with and without stuttering.
I even asked my wife to stutter some but,
sadly, to no avail.

When Tim Chase mentioned "battery-installed",
i interpreted it as "all is there". It seems
that either
a) not all the batteries are installed in my
version (v2.5.2)
or
b) some setup/linkage needs to be performed
in order to get the GUI running.

The error itself is:
ImportError: No module named tkinter

Suggestions?

--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be lazy

K Viltersten

3/2/2008 12:50:00 AM

0

>> When that fails, try without the stutter <G>
>>
>> import tkinter
>
> I must be doing something wrong because
> neither tkinter nor tkininter works.
> I tried both with and without stuttering.
> I even asked my wife to stutter some but,
> sadly, to no avail.
>
> When Tim Chase mentioned "battery-installed",
> i interpreted it as "all is there". It seems
> that either
> a) not all the batteries are installed in my
> version (v2.5.2)
> or
> b) some setup/linkage needs to be performed
> in order to get the GUI running.
>
> The error itself is:
> ImportError: No module named tkinter
>
> Suggestions?


Here's a suggestion. Python is case-sensitive,
while the users trying to help you are not.
When they say "tininkerbell", they may mean
"Tinkerbell". Check with "help()", then
"modules" and see if it's installed or not.

Sincerely
Yourself

:)

(Seriously speaking - i'm thankful.)





Aaron Brady

3/2/2008 1:58:00 AM

0

On Mar 1, 6:49 pm, "K Viltersten" <t...@viltersten.com> wrote:
> >> When that fails, try without the stutter <G>
>
> >> import tkinter
>
> > I must be doing something wrong because
> > neither tkinter nor tkininter works.
> > I tried both with and without stuttering.
> > I even asked my wife to stutter some but,
> > sadly, to no avail.
>
> > When Tim Chase mentioned "battery-installed",
> > i interpreted it as "all is there". It seems
> > that either
> > a) not all the batteries are installed in my
> > version (v2.5.2)
> > or
> > b) some setup/linkage needs to be performed
> > in order to get the GUI running.
>
> > The error itself is:
> > ImportError: No module named tkinter
>
> > Suggestions?
>
> Here's a suggestion. Python is case-sensitive,
> while the users trying to help you are not.
> When they say "tininkerbell", they may mean
> "Tinkerbell". Check with "help()", then
> "modules" and see if it's installed or not.
>
> Sincerely
> Yourself
>
> :)
>
> (Seriously speaking - i'm thankful.)- Hide quoted text -
>
> - Show quoted text -

AmbiguityWarning: Variables 'tklst' and 'tklist' resemble 'tkst'.
Automatic snap-to-slot has been disabled.

Ricardo Aráoz

3/2/2008 2:18:00 AM

0

K Viltersten wrote:
>>> import tkininter
>>>
>> When that fails, try without the stutter <G>
>>
>> import tkinter
>
>
> I must be doing something wrong because
> neither tkinter nor tkininter works.
> I tried both with and without stuttering.
> I even asked my wife to stutter some but,
> sadly, to no avail.
>
> When Tim Chase mentioned "battery-installed",
> i interpreted it as "all is there". It seems
> that either
> a) not all the batteries are installed in my
> version (v2.5.2)
> or
> b) some setup/linkage needs to be performed
> in order to get the GUI running.
>
> The error itself is:
> ImportError: No module named tkinter
>
> Suggestions?
>

import Tkinter

(first letter is uppercase)

Dennis Lee Bieber

3/2/2008 2:23:00 AM

0

On Sat, 01 Mar 2008 23:17:45 -0300, Ricardo Aráoz <ricaraoz@gmail.com>
declaimed the following in comp.lang.python:


> import Tkinter
>
> (first letter is uppercase)

<sigh> I should have checked... I /knew/ the extra "in" was
incorrect, but failed to actually look for the full form of the
module...
--
Wulfraed Dennis Lee Bieber KD6MOG
wlfraed@ix.netcom.com wulfraed@bestiaria.com
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: web-asst@bestiaria.com)
HTTP://www.bestiaria.com/

Peter Decker

3/2/2008 2:59:00 AM

0

On Sat, Mar 1, 2008 at 3:35 PM, K Viltersten <tmp1@viltersten.com> wrote:
> I'm certain there is an API for creating
> GUI's but as far i can find it in the
> http://docs.python.org/tu...
> the only "gui" is in "Guido".

Check out Dabo: http://d...

It uses the wxPython UI toolkit, but wraps it in a much more Pythonic API.

I've been using Dabo for over a year, and it rocks!!

--

# p.d.

Bill

3/2/2008 4:04:00 AM

0

Peter Decker wrote, On 3/1/2008 9:58 PM:
> On Sat, Mar 1, 2008 at 3:35 PM, K Viltersten <tmp1@viltersten.com> wrote:
>> I'm certain there is an API for creating
>> GUI's but as far i can find it in the
>> http://docs.python.org/tu...
>> the only "gui" is in "Guido".
>
> Check out Dabo: http://d...
>
> It uses the wxPython UI toolkit, but wraps it in a much more Pythonic API.
>
> I've been using Dabo for over a year, and it rocks!!
>

Hi Peter,

You should also take a look at wxGlade:

http://wxglade.source...

which sits on top of wxPython:

http://wxp...

which wraps wxWidgets:

http://www.wxwi...


I've found that wxGlade is more usable, currently, than Dabo in it's
visual layout tools that help you create the GUI for your apps.

If you want a more "Pythonic" API (more than wxPython/wxWidgets) and
want to write your GUI using mainly code instead of a visual layout
tool, then Dabo is probably the way to go.

If you want an interactive application that lets you visually create
Frame or Dialog based applications, full of "widgets", then wxGlade is
pretty good these days. Dabo, last time I looked, didn't yet have a
usable visual menu creation capability in it's toolset, and this is a
major reason, for me, that I currently have gravitated back to wxGlade.
Also, although Dabo has a "Class Designer" that can design the GUI
visually, and is in some ways more advanced than wxGlade, it seems in
other ways to be more limiting.

Neither one, unfortunately, is very well documented, but wxGlade is
fairly obvious, and directly generates wxPython code (not a "higher
level" API as is done in Dabo), which lets you use the wxGlade and
wxWidgets documentation to figure things out.

Also, BTW, I think the statement on the wxGlade site about "the
generated code does nothing apart from displaying the created widgets",
is not really true, and should be re-worded. Current versions of
wxGlade include the capability to automatically create simple
event-handler functions, and automatically generates the code to connect
the events generated by the GUI widgets to the event handlers. In my
opinion, this is much more than doing "nothing apart from displaying the
created widgets". It helps make it real easy to call your handler
functions, and I don't really want it doing much more than that anyway.

In either case, when you write your own code, it is probably best to
learn how to have the tool generate the code containing the classes that
form the GUI interface, but, use derived classes (subclasses) in your
own separate file(s) to form your application's interface to the GUI.
That way, you can let wxGlade (or Dabo) always generate (and overwrite)
its own code that remains entirely separate from your own code.


Bill










Grant Edwards

3/2/2008 4:15:00 AM

0

On 2008-03-02, K Viltersten <tmp1@viltersten.com> wrote:
>>> import tkininter
>>>
>> When that fails, try without the stutter <G>
>>
>> import tkinter
>
>
> I must be doing something wrong because
> neither tkinter nor tkininter works.

You probably don't have tkinter installed. It's not installed
by default on many systems.

--
Grant Edwards grante Yow! Yow! I'm imagining
at a surfer van filled with
visi.com soy sauce!