File handle not being released by close

B

Bryan Hepworth

Chris said:
Define "functionality". From the rest of your posts, that seems to be
limited to "press buttons" and "type small amounts of non-formatted
text" on the interaction side and "display small amounts of simply
formatted text" on the output side. I'm not denying that you can get
by with this functionality in a large number of cases, but it's
certainly not optimal in general. If it were, we'd all still be using
VT100 terminals.



What you're calling "slickness" is what other people call "usable".
Obviously it could be done without the ajax, but you lose features and
usability. It's slower, because it takes a full page load, and I lose
the context of the discussion.



My out of the box firefox install simply denies the operation and
raises a javascript error.



How have you decided that you've never needed it? Have you ever worked
with a UI designer or workflow expert? Or have you just never bothered
to implement it and you never heard anything from your users? How
closely have you worked with the users of your applications?



As phishing attacks become more common, browsing are restricting the
ability to remove or modify chrome. Again, a good feature for a
browser, not so much for an application platform.



It depends on your target audience and deployment arena. The context
is cross platform applications, so at least 2 browsers and at least 2
platforms are required. Don't forget browser versioning, too - IE 5 is
different than IE 6 is different than IE 7. Even "straightforward"
HTML has non-trivial cross browser differences.



You simply can't do much of anything beyond display text and basic
crud with straightforward HTML without stying. If that is the sole
limit of your UI needs, then bully for you but that's hardly the
common case and I'd venture that you don't have the experience to
support the rather sweeping claim you made.



An application is not a book. Of course you fill the whole "screen"
with widgets - your application is defined by the widgets that it has,
and the amount of space those widgets take up is your screen space.



That's simply not true, and I don't think you can objectively justify
it. Besides, you specifically claimed HTML dialogs as being a
replacement for "real" ones, and that can't be done using trivial
interfaces. It requires DHTML, sometimes ajax, and/or browser support.



I would challenge the assumption that, starting from zero, it is less
complicated to write a web application, much less a "pretend" web app
using a local web server, than a desktop application using Tkinter
(ick) or wxPython or pyQt. I would also challenge the assumption that
'a lot of the time' you can get away with a simple HTML interface, at
least by my personal definition of 'get away with'. I've worked a lot
with data entry people, where the actual requirements in terms of
slickness and flash are quite small. But "basic html" simply does not
fit the bill. There is a real cost in terms of how fast and how
accurately they can enter data in this environment.

Moreover, if you *don't* need global access or zero-deployment
(zero-deployment is always nice but most environments where you can
reasonably force a specific browser and version also have IT
infrastructure), then you should ask yourself if forcing your
application in the web app model (I haven't even touched on the whole
stateless HTTP being mapped to a stateful environment issue, or the
need to manage the local web server) actually buys you anything. I
simply do not buy the claim that HTML interfaces are necessarily
simpler in any but the most trivial of cases, and even in those
super-trivial applications there are often hidden concerns that don't
filter up to management.



Exactly how much time do you think using an HTML interface with an
embedded server would have saved you, especially considering the
careful care you have to take with access to the serial port? For the
record, I've written over a dozen client applications, many of which I
would consider trivial (but used features that would be expensive or
impossible to implement in the browser) and probably twice that many
web apps.



Plural of anecdote and all that. Make a survey of every application
that you interact with and see how many of them need to interact with
arbitrary files from the filesystem.



CRUD with javascript is something I actually have a lot of experience
with. Deficiencies in the data entry UI have real consequences because
you get invalid data and slow data entry speeds. The auto-completing
combo-box, for example, is simply impossible in a browser without
quite complicated (and slow) DHTML and is a huge boon for data entry.

I'm not trying to claim that there are no benefits to web
applications. But I often see people touting the web as a *superior
application platform*, which is simply false, and as innately simpler
to develop for, which is also false.
I'm also in a similar predicament starting to look at Python for the
first time.

I'd be curious to know peoples take on other GUI's like pygtk and pyqt
for example to get a fuller picture. As a total newbie the list seems
daunting so taking advantage of other peoples experiences seems like a
good idea.

Bryan
 
S

Steve Holden

Chris said:
CRUD with javascript is something I actually have a lot of experience
with. Deficiencies in the data entry UI have real consequences because
you get invalid data and slow data entry speeds. The auto-completing
combo-box, for example, is simply impossible in a browser without
quite complicated (and slow) DHTML and is a huge boon for data entry.
It's not even that easy in wxPython is you choose the wrong widget - I
tried to make a combo box accept text and select the drop-down elements
from a database and it turned out to be way too tricky to manage easily.

Having said that, I quickly discovered superior alternatives once I got
rid of my "it has to be a combo box" mentality. While great GUIs have
been created as web front-ends it is substantially more difficult to
create them than it is with a simple-ish GUI toolkit like wxPython,
particularly with a GUI designer like wxDesigner behind it.
I'm not trying to claim that there are no benefits to web
applications. But I often see people touting the web as a *superior
application platform*, which is simply false, and as innately simpler
to develop for, which is also false.

I would agree. The inherent state-maintenance and interaction problems
have caused the ASP.NET model to be somewhat counterintuitive, to say
the least, though it *has* made it easier to build complex interfaces
that it is on the "raw web". As with all such things, though, once you
run into the limits of the model, the promise of "point-and-click
programming" rapidly becomes a dim memory.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------
 
K

kyosohma

Tkinter comes more naturally to me than other toolkits because I'm also
a Tcl developer. I just haven't felt the need to learn wxPython because
I can get what I need from Tkinter, even the more complicated GUI layouts.

Yeah...I would assume I would enjoy Tkinter more if I knew more tcl.
Until that day arrives though, it will probably still be fairly
confusing for me to figure out. I do like it's "pythonic" style
though.

Mike
 
P

Paul Rubin

Chris Mellon said:
Define "functionality". From the rest of your posts, that seems to be
limited to "press buttons" and "type small amounts of non-formatted
text" on the interaction side and "display small amounts of simply
formatted text" on the output side.

OK, I can live with that, if you include displaying images on the
output side.
I'm not denying that you can get
by with this functionality in a large number of cases,

Precisely my point.
but it's certainly not optimal in general.
If it were, we'd all still be using VT100 terminals.

Nah, HTML gui's are much easier to use than pure text interfaces,
because of the visual gui elements, pointing with the mouse, simple
control over fonts and color, etc.
What you're calling "slickness" is what other people call "usable".

I notice google search doesn't use ajax (or didn't til recently) and
has satisfied an awful lot of users with simple html.
My out of the box firefox install simply denies the operation and
raises a javascript error.

Hmm, the user might have to change a setting in about:config but
that's certainly easier than installing a desktop application. I
haven't done this with firefox. In Communicator you'd just call
netscape.security.privilegemanager and ask for the permission that you
needed.
How have you decided that you've never needed it? Have you ever worked
with a UI designer or workflow expert? Or have you just never bothered
to implement it and you never heard anything from your users? How
closely have you worked with the users of your applications?

If the app has enough slickness requirements that the customer is
willing to pay for the attention of UI designers or workflow experts,
maybe it also needs context menus, I don't know. Generally I'd say
there are several levels:

1. In-house app that will have 1 to 10 users who run it now and
then. Every minute of unnecessary development is wasting their money,
so they want the quickest and cheapest possible solution. Web app is
very often an easier way to do this than desktop gui app, even if the
functionality is bare bones. I've done several of these, either as
desktop apps or web apps, generally working closely with the user, and
nobody has said anything about context menus. I think this case is
very common. In some instances the sole user is me, so nobody else
has to be satisfied.

2. Wide-use app that will have 1000's of users, including
non-in-house users who tend to distrust desktop installs. Web app is
superior for deployment reasons even if you have to give up some ui
niceties. This is what I do most of the time as a web developer. I
tend to write simple html to implement functionality, then let a real
designer spiff it up to look slick on multiple browsers while I
concentrate on the backend programming.

3. In-house app somewhere between 1 and 2, i.e. maybe there are
dozens or hundreds of users who will interact with the program all day
long. Usability becomes more important, so this can go either way.
Maybe this is where you want to UI experts involved. It sounds like
your CRUD apps are often in this category. Not everybody's are. Mine
haven't been so far. If I were in this situation I'd consider both
the web and desktop approaches and could go either way depending on
the specific requirements.

4. Shrink-wrap consumer app, zillions of units to ship, pizzazz
sells boxes, slickness is king. You need a whiz-bang desktop gui done
by real artist/designers. I'm just a coder, so my approach would be
write a slapdash tkinter or web gui to figure out the necessary
functionality in conjunction with UI specialists, then write a spec
based on the prototype and turn it over to the artistic gurus, with me
doing the backend stuff in cooperation with them. I haven't so far
done anything like this even though I worked at a game company for a
while. I think most of us can code our way through life without ever
doing it.
As phishing attacks become more common, browsing are restricting the
ability to remove or modify chrome.

I'm using firefox 2 and sites pop chromeless windows all the time, so
I'm not sure what browsers you're referring to.
It depends on your target audience and deployment arena. The context
is cross platform applications,

I don't see anything about cross platform in the OP's original post.
If cross platform were important I'd start asking whether the app
needed to be usable from mobile phones. If yes, that weighs heavily
for browsers.
You simply can't do much of anything beyond display text and basic
crud with straightforward HTML without stying. If that is the sole
limit of your UI needs, then bully for you but that's hardly the
common case and I'd venture that you don't have the experience to
support the rather sweeping claim you made.

I think it's a very common case, which is why so much stuff is being
done on the web instead of the desktop.
That's simply not true, and I don't think you can objectively justify
it. Besides, you specifically claimed HTML dialogs as being a
replacement for "real" ones, and that can't be done using trivial
interfaces. It requires DHTML, sometimes ajax, and/or browser support.

I guess I'm not sure what you mean about dialogs. I would consider
some html input fields with a submit button to be a dialog. Sometimes
a little client side JS can make things a bit nicer. I guess that
technically counts as DHTML but if you keep it simple, you can avoid
most cross-browser issues.
I would challenge the assumption that, starting from zero, it is less
complicated to write a web application, much less a "pretend" web app
using a local web server, than a desktop application using Tkinter
(ick) or wxPython or pyQt. I would also challenge the assumption that
'a lot of the time' you can get away with a simple HTML interface, at
least by my personal definition of 'get away with'. I've worked a lot
with data entry people, where the actual requirements in terms of
slickness and flash are quite small. But "basic html" simply does not
fit the bill. There is a real cost in terms of how fast and how
accurately they can enter data in this environment.

Well, not everybody needs to enter data all day long. If they need to
enter seven numbers into a form once a week and it takes them 15
seconds with a special desktop app and 17 seconds with a web app and
there are only three users, go for the web app if it saves you any
development or support time.
Exactly how much time do you think using an HTML interface with an
embedded server would have saved you, especially considering the
careful care you have to take with access to the serial port?

I am sure it would have saved at least half the development time of
that app. But it's not a fair comparison since that was a 16 bit
MS-DOS app written in C.
Plural of anecdote and all that. Make a survey of every application
that you interact with and see how many of them need to interact with
arbitrary files from the filesystem.

OK, looking at what's on my screen during most of my workday:

1) one or more browser windows. No file system interaction.
2) Several terminal windows, no file interaction from the terminal
itself, but I run command line apps (mostly emacs) in the terminals
and those sometimes use the file system.
3) Text chat client, I think it can send and receive files but I never
use that feature. I would not run this particular app if it were
up to me but management chose it. But it is a sort of legitimate
use of a desktop gui.
4) Email client again chosen by management. This one does use the
file system to send and receive attachments, but that's not
fundamentally required since webmail clients are very popular and
effective and can upload and download. At home I read email with
emacs.

The only other desktop gui program I can think of that I use with any
regularity is a PDF viewer occasionally launched by the browser. More
typically this is done with a browser plugin rather than a separate
app, but my desktop is set up to launch xpdf separately. Under
Windows I sometimes used IDLE for Python development but under Linux I
run python inside emacs.
CRUD with javascript is something I actually have a lot of experience
with. Deficiencies in the data entry UI have real consequences because
you get invalid data and slow data entry speeds. The auto-completing
combo-box, for example, is simply impossible in a browser without
quite complicated (and slow) DHTML and is a huge boon for data entry.

I'm not sure what that combo box is. I've probably seen one but I'm
just not sure exactly what you're referring to. Maybe it's important
if you write heavily used CRUD apps. Not everybody who needs a gui
writes those apps.
I'm not trying to claim that there are no benefits to web
applications. But I often see people touting the web as a *superior
application platform*, which is simply false, and as innately simpler
to develop for, which is also false.

I think it is simpler until you're trying to do stuff that's both
slick and multi-platform, but not everyone cares about being both of
those things simultaneously. I generally don't care about slickness
and accomplish multi-platform by writing dirt-simple html.
 
C

Chris Mellon

"Chris Mellon" <[email protected]> writes:

<snip over-long thread>

I had a bunch of replies to each section but I think this is getting
too long so I'll sum up.

You repeatedly have used the word "slickness" as a pejorative. I find
that offensive and it's insulting to users. When I write applications,
I want the interface to be as smooth and trouble free as possible,
with a simple a learning curve and the fewest possible bumps for them.
This isn't a matter of adding chrome or shine or rounded corners and
specular highlights. It's about letting them enjoy working with an
application instead of tolerating it. It's the same reason I use
Python and not C. It's about respect for their time and their
preferences.

As a matter of time spent in development, I do not find that
non-trivial UIs are significantly easier to develop using web
interfaces.

As a matter of respect for the user, I'm not going to tell them to use
a trivial UI if a non-trivial one will save them time, learning
effort, or frustration. In order to make this decision, I like to work
with the people actually using it and watch them at work. To see what
kind of extra steps they have to take and where I can save them time
or inaccuracy or frustration.
 
S

sjdevnull

Hi,

I want to build a GUI to execut python script. I found TKinter and
wxpython. Which one is easier for a newbie? and which one is better?

If you want to have a native look and feel, I'd choose wxpython
(probably the Dabo builder for it). If not, I'd usually take a web UI
over tkinter, except in special simple cases. But it's really a
matter of taste. Dabo does make UI construction a lot simpler for me
(and for a lot of other people.).
 
P

Paul Rubin

Chris Mellon said:
You repeatedly have used the word "slickness" as a pejorative. I find
that offensive and it's insulting to users. When I write applications,
I want the interface to be as smooth and trouble free as possible,

It's a perjorative when it's done for its own sake and doesn't really
help the user. This happens a lot. When it helps the user, as it
sometimes does, then it's not perjorative.
As a matter of time spent in development, I do not find that
non-trivial UIs are significantly easier to develop using web
interfaces.

That's possibly true, but a lot of the time, trivial interfaces are
enough. Look at Google search, one of the most complex apps ever
built (tens or hundreds of MLOC, massive distributed crawler
infrastructure, 100's of PhD's figuring out the algorithms, etc.) but
its interface is simple HTML that you would probably call trivial. It
is quite possibly the most popular application in the world.
As a matter of respect for the user, I'm not going to tell them to use
a trivial UI if a non-trivial one will save them time, learning
effort, or frustration. In order to make this decision, I like to work
with the people actually using it and watch them at work. To see what
kind of extra steps they have to take and where I can save them time
or inaccuracy or frustration.

Right. Obviously this has to be decided according to the specific
needs of the application. A lot of times, trivial interfaces are
easier to learn than nontrivial ones, precisely because they are
trivial so there is less to learn. Again look at Google search for an
example.

Also, at least for in-house applications, while the user's time counts
(since their time costs your customer money), your development time
and deployment effort also costs money that comes from exactly the
same place, so you have to take into consideration the number of
users, amount of time they will spend using the program, just how much
of that time (if any) a fancier interface will save, etc.
 
C

Chris Mellon

It's a perjorative when it's done for its own sake and doesn't really
help the user. This happens a lot. When it helps the user, as it
sometimes does, then it's not perjorative.

To me, "slick" means well lubricated and smooth. It means that there
are no rough spots in your interaction. I use the term "flash" for
cosmetic features.
That's possibly true, but a lot of the time, trivial interfaces are
enough. Look at Google search, one of the most complex apps ever
built (tens or hundreds of MLOC, massive distributed crawler
infrastructure, 100's of PhD's figuring out the algorithms, etc.) but
its interface is simple HTML that you would probably call trivial. It
is quite possibly the most popular application in the world.

When you start talking about trivializing the interface, what you're
actually talking about is trivializing the *process*. The UI is just a
mechanism for interaction. If you have complex interactions, then you
need complex UI (or your users have to do a lot of manual steps).

Search is a good example of trivial interaction. It's not really the
common case, though - in a regular web browser there's a half dozen
minimal points of interaction, and some of them are fairly
complicated. In terms of man-hours spent, raw data entry is one of the
largest cases of human-computer interaction and it's a significantly
more complex interface than search.

As you point out, the complexity of the interaction is only loosely
coupled to the complexity of the application itself, and the art of
designing simple interactions with complex systems is one of the
hallmarks of good design. Apple is generally quite good at this. Note
even so that simple interactions can have or require rather
complicated UI metaphors. Drag and drop is a very visceral, intuitive
interface (it's the second thing my 4 year old figured out how to do,
button clicking was the first) but it's quite complicated to
implement.

I rather suspect that Google has rather more complicated internal
administrative and reporting interfaces for the search engine, too.
Right. Obviously this has to be decided according to the specific
needs of the application. A lot of times, trivial interfaces are
easier to learn than nontrivial ones, precisely because they are
trivial so there is less to learn. Again look at Google search for an
example.

Also, at least for in-house applications, while the user's time counts
(since their time costs your customer money), your development time
and deployment effort also costs money that comes from exactly the
same place, so you have to take into consideration the number of
users, amount of time they will spend using the program, just how much
of that time (if any) a fancier interface will save, etc.

Business constraints are always there in software development. You
don't get enough testing, you don't have access to representative test
data, you don't have direct user feedback. And of course the guy
signing the checks, who often isn't the guy using the application, may
decide that an hour of your time isn't worth 100 hours aggravation
from his minimum wage data entry folks. But *I* care about that 100
hours and to the greatest extent possible within my ability and
contract, I will minimize that burden on them.
 
C

Cameron Laird

.
[scores of lines
of vigorous debate]
.
.
Moreover, if you *don't* need global access or zero-deployment
(zero-deployment is always nice but most environments where you can
reasonably force a specific browser and version also have IT
infrastructure), then you should ask yourself if forcing your
application in the web app model (I haven't even touched on the whole
stateless HTTP being mapped to a stateful environment issue, or the
need to manage the local web server) actually buys you anything. I
.
.
.
Go ahead: touch on statefulness. I've been pondering the topic
lately, and wonder what's new on the subject. I find it plenty
difficult to cast this as anything but a big liability for the
Web app team.
 
C

Cameron Laird

.
[waaaaaaay too
much quoted text
for my taste]
.
.
I'm also in a similar predicament starting to look at Python for the
first time.

I'd be curious to know peoples take on other GUI's like pygtk and pyqt
for example to get a fuller picture. As a total newbie the list seems
daunting so taking advantage of other peoples experiences seems like a
good idea.

Bryan

The traditional answer is, "We've already discussed that far too
often; go search the comp.lang.python archive on your own, because
all the answers are there."

I regard that as unhelpful. <URL:
http://wiki.python.org/moin/ChoosingGuiToolkits > *could* be a good
answer, but it's not, at least not yet. Perhaps the best immediate
help is <URL: http://wiki.python.org/moin/GuiProgramming >.

Even better, maybe: read through these materials, start to integrate
your own findings into what the Wiki already makes available, and
likely others of us will pitch in.
 
C

Cameron Laird

.
.
.
I should also add: there is also the possibility of running a Python
program with an embedded http server on the same desktop as the
browser, using the browser purely as a gui, but with the Python
program having complete access to the file system and so forth. This
could be seen as combining the disadvantages of both the remote web
server approach (i.e. gui elements constrained by the browser) and the
all-desktop approach (deployment issues). However, a lot of the time
it's still just plain easier to do. Whenever I've written a desktop
gui app I've always just been shocked at how much time goes into
making the gui look decent and do the right stuff, even though none of
mine have been even slightly slick (they've all been for industrial
applications). When I do a web gui, it's been just a matter of
tossing some html into a file or into some print statements, viewing
it in a browser, and tweaking it a little as needed. Maybe that's
mostly a matter of the lousy state of gui toolkits, and we actually
need a toolkit that's more like an embedded browser. But we don't
have that at the moment.

One key to Tkinter's longevity lurks there. While
many whine about the antiquity of the appearance of
Tkinter's widgets, they have the virtue of sensible
defaults; more than any other toolkit, Tkinter comes
up with minimal refinements in a sensible and
consistent state. While those with an artistic eye
assure me the simplest Tkinter programs look worse
that corresponding ones built with any other toolkit,
they behave the most coherently in regards to resizing
and so on.
 
K

kyosohma

.
.
.




One key to Tkinter's longevity lurks there. While
many whine about the antiquity of the appearance of
Tkinter's widgets, they have the virtue of sensible
defaults; more than any other toolkit, Tkinter comes
up with minimal refinements in a sensible and
consistent state. While those with an artistic eye
assure me the simplest Tkinter programs look worse
that corresponding ones built with any other toolkit,
they behave the most coherently in regards to resizing
and so on.

I am curious. What are these "sensible defaults" that you mention?

If you set up a wxPython program's sizers appropriately, the program
should resize logically. But I think Tkinter is a little bit easier in
that respect. However, you can get pretty granular in how you want
items to behave in wxPython that you may not be able to do in Tkinter.
I just don't know.

I've used both, so I'm interested in hearing your opinion.

Mike
 
P

Paul Rubin

.
Go ahead: touch on statefulness. I've been pondering the topic
lately, and wonder what's new on the subject. I find it plenty
difficult to cast this as anything but a big liability for the
Web app team.

I'm not sure what you're getting at in this context. You can write a
desktop app where the window system communicates with a gui toolkit
through a socket (at least that's how X windows works), or you can
write a web app where a browser communicates with an http listener
through a socket. What's the difference, as far as application state
is concerned?

I haven't used wxpython but for tkinter you'd typically have a gui
event loop in its own thread, communicating with the application
through queues. Similarly you can use BaseHTTPServer to collect
browser hits and get the data out of them with the cgi module
functions before passing them to the app. If you want to handle
multiple concurrent users you get into the usual issues of web
servers, but if you're just doing a single user web implementation as
an alternative to a desktop gui, some rudimentary locking is probably
enough to stop accidental simultaneous connections.

If the application is simple enough, you can just write it as a cgi
and keep the state in disk files.
 
H

Hendrik van Rooyen

Paul Rubin said:
I'm not sure what you're getting at in this context. You can write a
desktop app where the window system communicates with a gui toolkit
through a socket (at least that's how X windows works), or you can
write a web app where a browser communicates with an http listener
through a socket. What's the difference, as far as application state
is concerned?

I haven't used wxpython but for tkinter you'd typically have a gui
event loop in its own thread, communicating with the application
through queues. Similarly you can use BaseHTTPServer to collect
browser hits and get the data out of them with the cgi module
functions before passing them to the app. If you want to handle
multiple concurrent users you get into the usual issues of web
servers, but if you're just doing a single user web implementation as
an alternative to a desktop gui, some rudimentary locking is probably
enough to stop accidental simultaneous connections.

If the application is simple enough, you can just write it as a cgi
and keep the state in disk files.

Something that is often overlooked is keeping some state in the buttons.
It involves changing the text, colour and the command binding, and
possibly setting up a callback using .after for time outs, if necessary.
You can do quite complicated sequences like this, if you have a mind to.

Its a bit of a PITA - but then all state machines are, no matter how you
implement them. Their chief advantage is that they force you to think
of all the possibilities.

- Hendrik
 
G

greg

Paul said:
I'm not sure what you're getting at in this context. You can write a
desktop app where the window system communicates with a gui toolkit
through a socket (at least that's how X windows works)

An X server connection is *much* more stateful than
an HTTP one. It persists throughout the entire use
session of the application, for one thing, and there
is heaps of state being kept on both sides of the
connection. There's also a very high communication
bandwidth between them. There's really no comparison.
 
P

Paul Rubin

greg said:
An X server connection is *much* more stateful than
an HTTP one. It persists throughout the entire use
session of the application, for one thing, and there
is heaps of state being kept on both sides of the
connection. There's also a very high communication
bandwidth between them. There's really no comparison.

The high bandwidth and persistence is not needed for an http
connection, which just gets a form submission once in a while. The
persistence and bandwidth is instead present in the X connection
between the window system and the browser.
 
K

Kevin Walzer

Cameron said:
While those with an artistic eye
assure me the simplest Tkinter programs look worse
that corresponding ones built with any other toolkit,
they behave the most coherently in regards to resizing
and so on.

"Look worse" can be addressed through extensive means: through theming
(via Tile, which can now be easily used in Tkinter; see
http://tkinter.unpy.net/wiki/TileWrapper); and through other aspects of
UI design, such as color, fonts, and even use of icons. A pyGtk or
wxPython application that uses old-school Gnome icons, for instance,
will look ugly. It's quite possible to make an attractive Tkinter
application using modern, stylish icons that even blends in reasonably
well on a specific platform (I've done it).
 
C

Chris Mellon

"Look worse" can be addressed through extensive means: through theming
(via Tile, which can now be easily used in Tkinter; see
http://tkinter.unpy.net/wiki/TileWrapper); and through other aspects of
UI design, such as color, fonts, and even use of icons. A pyGtk or
wxPython application that uses old-school Gnome icons, for instance,
will look ugly. It's quite possible to make an attractive Tkinter
application using modern, stylish icons that even blends in reasonably
well on a specific platform (I've done it).

--

Using Tile, of course, loses you the first major benefit of Tk - that
it's already included in the standard library. So in this sense it's
still "ugly old school look and feel" vs "no external dependencies",
which is the swing decision for many people. People who prefer the Tk
API, of course, will be happy to use Tile.

Also, while you can get (mostly) native *look*, the feel is absent.
Unless I'm very uninformed, Tile is a theming engine only, and doesn't
implement platform conventions with regard to behavior (the "feel"
part of look and feel).
 
K

Kevin Walzer

Chris said:
On 8/8/07, Kevin Walzer <[email protected]> wrote:
Using Tile, of course, loses you the first major benefit of Tk - that
it's already included in the standard library. So in this sense it's
still "ugly old school look and feel" vs "no external dependencies",
which is the swing decision for many people. People who prefer the Tk
API, of course, will be happy to use Tile.

Tile has been implemented in the Tk core starting with version 8.5,
still somewhere between alpha and beta stage. Once 8.5 is out, and
Python is configured to build against Tk 8.5 (instead of 8.4), it should
Just Work.
Also, while you can get (mostly) native *look*, the feel is absent.
Unless I'm very uninformed, Tile is a theming engine only, and doesn't
implement platform conventions with regard to behavior (the "feel"
part of look and feel).

What do you mean here? Things like keyboard accelerators, menu
placement, and so on? Those things are already natively implemented by
Tk, and the developer just needs to invoke them. Sometimes some
conditional code is required for stuff like keyboard accelerators (the
"tk windowingsytem" command is useful for this), but again, it should
Just Work.

Or am I missing something?
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top