[Python-ideas] Move Demo scripts under Lib

Guido van Rossum guido at python.org
Tue Oct 26 16:56:51 CEST 2010

On Tue, Oct 26, 2010 at 7:33 AM, Dirkjan Ochtman <dirkjan at ochtman.nl> wrote:
> On Tue, Oct 26, 2010 at 16:00, Alexander Belopolsky
> <alexander.belopolsky at gmail.com> wrote:
>> What do you think?
> After browsing through the Demo dir a bit, I came away thinking most
> of these should just be removed from the repository.

+1. Most of them are either quick hacks I once wrote and didn't know
where to put (dutree.py, repeat.py come to mind) or in some cases
contributed 3rd party code that was looking for a home. I think that
all of these ought to live somewhere else and I have no problem with
tossing out the entire Demo and Tools directories -- anything that's
not needed as part of the build should go. (Though a few things might
indeed be moved into the stdlib if they are useful enough.)

> I think there's
> enough demo material out there on the internet (for example in the
> cookbook), a lot of it of higher quality than what we have in the Demo
> dir right now. Maybe it makes sense to have a basic tkinter app to get
> you started. And some of the smaller functions or classes could
> possibly be used in the documentation. But as it is, it seems silly to
> waste developer time on stuff that few people look at or make use of
> (I'm assuming this from the fact that they have previously been
> neglected).

None of that belongs in the core distro any more.

> Back to the original question: I don't think moving the Demo stuff to
> the Lib dir is a good idea, simply because the Lib dir should contain
> libraries, not applications or scripts. Writing a section for the
> documentation seems a better way to solve the discoverability problem,
> testing could be done even in the Demo dir (with more structure if
> need be), and quality control could just as well be exercised in the
> current location.

If there are demos that are useful for testing, move them into Lib/test/.

--Guido van Rossum (python.org/~guido)

More information about the Python-ideas mailing list