Ten Essential Development Practices

P

Paul Rubin

Mike Meyer said:
I think you're the first person I've heard call IDLE an IDE. Then
again, I don't pay much attention to it.

I use IDLE all the time and it wouldn't have occurred to me that it's
something other than an IDE. It's not very good, but that's a
different matter.
 
D

Dennis Lee Bieber

We already have multiple distributions of Python: CPython, IronPython,
and Jython (and there's at least one more). We even have multiple

Possibly the "Enthought" package, which attempted to collect
Python and half a dozen third-party libraries under one installer (with
the result that one now has half a dozen libraries that are all a
release or two behind "current").

--
 
C

Cliff Wells

The usual way to do that is with a web GUI, but nothing stops you from
running Tkinter on a Unix server through a remote X connection.

Of course not, but unless the servers are on a trusted network and use
an authentication scheme such as kerberos, you are asking for trouble.

Cliff
 
P

Paul Rubin

Cliff Wells said:
Of course not, but unless the servers are on a trusted network and use
an authentication scheme such as kerberos, you are asking for trouble.

If it's for sensitive stuff normally you'd use https.
 
E

Ed Leafe

How on earth did you decide that, since tkinter actually runs out of
the box when you install Python on most platforms, and wxPython doesn't?

Because Tkinter looked like crap on OS X. Sorry, but it's hard to sell an
application that looks bad. Our target for the framework is to build
cross-platform apps that look native on each platform. Tkinter didn't measure
up in that regard.
I can't even think about trying out Dabo unless I'm willing to go through
some enormous pain of getting wxPython to work.

There are step-by-step instructions on the wxPython site for building it if
you need to go that route. There are also pre-built binaries for many
platforms. On my Ubuntu system, the Synaptic Package Manager installed it
with a couple of mouse clicks.

Hey, if this is really too difficult for you, fine. But I don't think it's
fair to insist that everyone else follow your particular preferences in
Python. The only one who gets to do that is Guido, and he's already endorsed
wxPython, and that's good enough for me and most of the Python community.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
 
E

Ed Leafe

On a somewhat unrelated note: is there any "overlap"/"possibility of
collaboration" between Dabo-UI and Wax?  (I have use neither, sticking
to pure wxPython so far.)

I've contacted Hans and we've discussed the possibility, but he didn't seem
to feel that it would worth it to him. He works on Wax as he needs to, and is
kind enough to share his work with the rest of us. It certainly isn't his
main focus, though.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
 
C

Cliff Wells

I can put up a Tk gui in about 5 lines of code from a stock Python
distro without having to install anything additional. How do I do
that with wxPython?

How can I embed a browser in Tk (I mean a real browser, like Mozilla,
Safari, or even Exploder)? At all? On any platform? This has always
been the tradeoff for Tk. wxPython has a much larger selection of
sophisticated widgets than Tk does (I first tried wxPython because of
its grid widget, which Tk didn't have at the time and the pure Tk
version I wrote was sloooow. I doubt Tk still has anything that
compares).

I'm working on improving my user interface designs and I'm leaning
toward the hybrid HTML + GUI systems as seen in many utilities (such as
Norton AV, AdAware, etc). I don't see that approach as being even
remotely possible in Tkinter.

Tk is great for learning, easy to write small, basic interfaces, less
great for deploying real world apps with sophisticated interfaces. I've
often felt that Tk was the VB of GUI toolkits: terrific for knocking out
simple stuff, but starts to bite you in the *** when you try to do the
hard stuff. wxPython is the opposite: it has a steeper learning curve,
but once you know it, you can do amazing things. For me, the long term
benefits are far more important to me than how low the startup costs
are.

Besides, as mentioned earlier, you *do* need to install something
additional: the python-tkinter package such as:

http://www.python.org/ftp/python/2.4.1/rpms/fedora-3/python2.4-tkinter-2.4.1-1pydotorg.i386.rpm

Although I'll also admit it seems that it can be easier (for many
people) to mess up your wxPython install than your Tkinter install.


Regards,
Cliff
 
E

Ed Leafe

My objection with wrappers around wrappers around wrappers is that I
have no hope ever watching the ground. If some error occurs, which
layer has to be addressed? Which developing group is reponsible? My own
or that of team A, team B, team C ... ?

FWIW, we view errors that occur in Dabo as our responsibility. We've had
several reported that were our fault, and we corrected them. Others were the
result of underlying bugs in wxPython, and we reported them to Robin, who
quickly fixed them.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
 
C

Cliff Wells

If it's for sensitive stuff normally you'd use https.

Hm, I haven't tried piping X over https... I wasn't even aware it was
possible... do you have a link I can check this out on?

Also, why not just stunnel or ssh -Y instead?

Cliff
 
E

Ed Leafe

Ed promised to support many GUI toolkits

I promised nothing of the sort. I said that we had designed our UI layer to
be toolkit-agnostic, with the design goal of making choice of UI toolkit
irrelevant. I also said that we recognize the sheer size of such a task, and
have no current plans to support any toolkit besides wxPython.

There is a difference in designing a project to make something *possible*,
and promising to implement all those possibilities.
 
P

Paul Rubin

Ed Leafe said:
Because Tkinter looked like crap on OS X.

Yes, it's cross-platform, it looks like crap everywhere ;-).
There are step-by-step instructions on the wxPython site for building it

If I need step by step instructions beyond

./configure
make
make install

then I'd say it's unfinished software and I'll be more interested in it
after it's done.
 
P

Paul Rubin

Cliff Wells said:
Hm, I haven't tried piping X over https... I wasn't even aware it was
possible... do you have a link I can check this out on?

I meant https for web interfaces. For other protocols it's simplest
to use stunnel or ssh (stunnel is probably a better choice), or run
your whole net connection through ipsec or whatever.
 
P

Paul Rubin

Ed Leafe said:
import dabo
app = dabo.dApp()
dApp.start()

Sorry, I couldn't do it in 5. ;-) Oh, and that includes a full menu, too.

I get an ImportError exception when I try that. Any suggestions? Note
that I don't get that exception from Tkinter.

bash-3.00$ python
Python 2.3.4 (#1, Oct 26 2004, 16:42:40)
[GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2
Type "help", "copyright", "credits" or "license" for more information. Traceback (most recent call last):
 
T

Torsten Bronger

Hallöchen!

Paul Rubin said:
No it's not on Fedora, at least FC3.

It may not be on a DVD but the RPMs are avaiable where Fedora should
look for them.
I had huge trouble trying to build it and gave up.

It's perfectly okay if you are used to build everything yourself but
this is a quite untypical approach.

Tschö,
Torsten.
 
T

Torsten Bronger

Hallöchen!

Cliff Wells said:
Cliff Wells said:
[...]

Well, I think this exposes one of the more interesting sides of
open source software in general. For better or worse, you get
choices. If you don't like choice, you won't like open source.

On the other hand, the GUI package bundled with Python is a
regular decision of some sort of committee.

No, it's a decision made by Guido some years ago that remains in
place because it's more pain to remove than to simple leave there.

http://wiki.python.org/moin/TkInter suggests that it's a more or
less regular decision.
Besides, define "bundled with".

Described in the standard library documentation.

Tschö,
Torsten.
 
P

Paul Rubin

Torsten Bronger said:
It may not be on a DVD but the RPMs are avaiable where Fedora should
look for them.


It's perfectly okay if you are used to build everything yourself but
this is a quite untypical approach.

I think my approach is in some sense completely typical: I don't want
to install ANYTHING, EVER. I've described this before. I want to buy
a new computer and have all the software I'll ever need already on the
hard drive, and use it from that day forward. By the time the
software is obsolete and I want new stuff, the hardware is also
obsolete, so I buy another new computer and start over. This is the
way most non-technical use their computers (Wintel boxes with MS
Office pre-installed), but then I don't get Python or much other
development stuff

Buying a Macintosh would maybe accomplish the above for me better than
wintel (i.e. it comes with dev stuff including Python), but somewhat
less typically, I also want access to all the source code, so I run
Linux on an x86 box. That means I approximate my zero-install desire
by starting with an empty hard drive and plopping in the FC3 (or now
FC4) DVD and clicking "install everything" just once at setup time.
After that, if I absolutely have to install anything, I consider it an
exceptional situation and so I want to compile from source, not unpack
a binary.
 
P

phil hunt

At PyCon DC 2004, Guido was asked about wxPython: "wxPython is the best and
most mature cross-platform GUI toolkit, given a number of constraints. The
only reason wxPython isn't the standard Python GUI toolkit is that Tkinter
was there first."

I was under the impression -- from reading this ng -- that wx was
buggy on some platforms and less portable than Tkinter. Not true?
 
P

phil hunt

Maybe. But Guidos intention with Python was to create a secondary
language originally - an extension language of C - ( unlike Java that
was concepted as a radically platform independent language and a
successor of C++ ).

These days you can almost think of C++ as a secondary language to
Python: code the app in Python and then optimise by recoding the
bits that need speed in C++.
Some other people already abandoned Python not for the worst reasons:

http://www.kevin-walzer.com/pivot/entry.php?id=69

My objection with wrappers around wrappers around wrappers is that I
have no hope ever watching the ground. If some error occurs, which
layer has to be addressed?

Good point.
 
P

phil hunt

Being a developer requires not only a bit of brains, but quite a bit of
tenacity as well. Apparently Kevin lacks the second.


Of course, Tkinter is still a wrapper around a third party library (Tk)
borrowed from a different language (Tcl) and written again in a third
language (C), much the same as wxPython.

In practise any Python GUI is going to contain code from otyher
languages since if it was coded all the way down in python it would
be too slow.
 

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
473,780
Messages
2,569,609
Members
45,254
Latest member
Top Crypto TwitterChannel

Latest Threads

Top