Re: [Tutor] Shelve del not reducing file size

2007-07-28 Thread Eric Brunson
Andreas Kostyrka wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > Eric Brunson wrote: > >> On Sat, July 28, 2007 4:01 am, Thorsten Kampe wrote: >> >>> * Kent Johnson (Fri, 27 Jul 2007 08:06:33 -0400) >>> >>> Barton David wrote: > *sigh* I'm

Re: [Tutor] Shelve del not reducing file size

2007-07-28 Thread Alan Gauld
"Eric Brunson" <[EMAIL PROTECTED]> wrote > On Sat, July 28, 2007 4:01 am, Thorsten Kampe wrote: >>> In what way is it Python's fault that the dbm database doesn't >>> reclaim >>> disk space? >> >> It's actually how most databases work. Even a simple Outlook pst >> file >> (which is a database, t

Re: [Tutor] Shelve del not reducing file size

2007-07-28 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Eric Brunson wrote: > On Sat, July 28, 2007 4:01 am, Thorsten Kampe wrote: >> * Kent Johnson (Fri, 27 Jul 2007 08:06:33 -0400) >> >>> Barton David wrote: >>> *sigh* I'm really going off Python. >>> In what way is it Python's fault that the

Re: [Tutor] Shelve del not reducing file size

2007-07-28 Thread Eric Brunson
On Sat, July 28, 2007 4:01 am, Thorsten Kampe wrote: > * Kent Johnson (Fri, 27 Jul 2007 08:06:33 -0400) > >> Barton David wrote: >> >>> *sigh* I'm really going off Python. >>> >> >> In what way is it Python's fault that the dbm database doesn't reclaim >> disk space? > > It's actually how most data

Re: [Tutor] Shelve del not reducing file size

2007-07-28 Thread Thorsten Kampe
* Kent Johnson (Fri, 27 Jul 2007 08:06:33 -0400) > Barton David wrote: > > *sigh* I'm really going off Python. > > In what way is it Python's fault that the dbm database doesn't reclaim > disk space? It's actually how most databases work. Even a simple Outlook pst file (which is a database, too

Re: [Tutor] Shelve del not reducing file size

2007-07-28 Thread Eric Brunson
Alan Gauld wrote: > "Andreas Kostyrka" <[EMAIL PROTECTED]> wrote > > >>> a lot to build the Tacoma Narrows bridge... Similarly you don't >>> need >>> much math to build a GUI friont end to a database, but you need >>> >> I would question even that one can write a good GUI frontend to a >

Re: [Tutor] Shelve del not reducing file size

2007-07-28 Thread Alan Gauld
"Andreas Kostyrka" <[EMAIL PROTECTED]> wrote >> a lot to build the Tacoma Narrows bridge... Similarly you don't >> need >> much math to build a GUI friont end to a database, but you need > > I would question even that one can write a good GUI frontend to a > database without the theory behind it.

Re: [Tutor] Shelve del not reducing file size

2007-07-28 Thread Kent Johnson
Andreas Kostyrka wrote: > Believe me, the Python developers are sure listening. Only that > "cleaning up the mess" has associated costs, that are usually not > acceptable. If it comes to "not breaking existing programs" or "cleaning > up the stdlib so it's nicer", "not breaking existing programs"

Re: [Tutor] Shelve del not reducing file size

2007-07-28 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Barton David wrote: > Eric Brunson wrote: >> You seem like a smart guy that's having a bad day, so I'm cutting you >> slack. > > Thanks Eric. Yes I did indeed have a bad day (and it got much much worse), > and this is most definitely a case of a ba

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Eric Brunson
Python is like democracy. It isn't perfect, but it's the best thing come up with so far. ;-) Barton David wrote: > Eric Brunson wrote: > > You seem like a smart guy that's having a bad day, so I'm cutting you > > slack. > > Thanks Eric. Yes I did indeed have a bad day (and it got much much

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
Eric Brunson wrote: > You seem like a smart guy that's having a bad day, so I'm cutting you > slack. Thanks Eric. Yes I did indeed have a bad day (and it got much much worse), and this is most definitely a case of a bad workman blaming his tools. I apologise to all concerned for voicing my frustr

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Tiger12506
>> cPickle/Pickle question is AFAIR documented, > > But not in a manner totally clear to a newbie. An experienced > programmer will figure out that a C implementation is faster but > what does that meabn when your only reference is a few weeks > of Python? And why is there two modules if one is bet

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alan Gauld wrote: > "Andreas Kostyrka" <[EMAIL PROTECTED]> wrote > >> was, that the only way to have more math courses would be to study >> something with mathematics in the title *g*) > > Thats true of most engineering courses. > Although I studie

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Alan Gauld
"Andreas Kostyrka" <[EMAIL PROTECTED]> wrote > was, that the only way to have more math courses would be to study > something with mathematics in the title *g*) Thats true of most engineering courses. Although I studied Electrical engineering the only compulsory subject for each of the 5 years(i

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alan Gauld wrote: > "Tiger12506" <[EMAIL PROTECTED]> wrote > >> Some people need degrees, most people don't. It all depends on what >> they are >> capable of understanding. > > It also depends what they are doing. > Most programmers don't build c

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Eric Brunson
One thing I don't think people realize, or at least don't talk about often enough, is that good programming, like good art, takes talent. I can draw a cat to make my 2yo happy or sketch my house well enough that someone could pick it out driving down the street, but if I paint every day for th

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Alan Gauld
"Tiger12506" <[EMAIL PROTECTED]> wrote > Some people need degrees, most people don't. It all depends on what > they are > capable of understanding. It also depends what they are doing. Most programmers don't build complex state machines, nor do they build safety critical systems. 90% or more of

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Alan Gauld
"Eric Brunson" <[EMAIL PROTECTED]> wrote >> newbie-friendly. My only complaint is that I'm starting to feel >> like I >> won't get much further than that without a computer science degree. > > I'll disagree with you on that, if you can get a PhD in genetics > then > programming should be a snap.

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Alan Gauld
"Eric Brunson" <[EMAIL PROTECTED]> wrote > It seems like new programmers today expect to be spoonfed their > information like they were in grammar school. I think its true they expect a lot of tutorial stuff, probably because of the number of idiot guides to programming in languages like VB/PHP e

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Alan Gauld
"Barton David" <[EMAIL PROTECTED]> wrote > I've learned to program with Python (and can hardly conceive of a > better > language to be honest)- and I still think the core language is > great: > elegant, easy to use and brilliantly documented. Completely agree. > But the more I explore the stan

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Tiger12506
> ...some credit. I taught myself to program, from scratch, without access > to (or time for) any courses whatsoever... 5 years now...core > language...certain standard modules pretty well... complaint...won't get > much further...without a computer science degree. Wow. I'm so *shocked*. Most p

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Eric Brunson
Barton David wrote: > > *Eric Brunson* wrote: > > > It seems like new programmers today expect to be spoonfed their > > information like they were in grammar school. They don't know what it > > is to hack a Makefile to get a package to compile or break out an > RFC to > > understand a protocol.

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
Eric Brunson wrote: > It seems like new programmers today expect to be spoonfed their > information like they were in grammar school. They don't know what it > is to hack a Makefile to get a package to compile or break out an RFC to > understand a protocol. If you don't understand something a

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Eric Brunson
the code you'd have to read is just more Python, anyway. Just me being a grouchy old programmer. In my day we had to program in 4 feet of snow, uphill... both ways! > Andreas > > >> >> >> -Original Message- >> From: Kent Johnson [mailto:[EMAIL

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
Andreas Kostyrka wrote: > Additionally, the language core is very very thought out, with glacial > enhancements. "Fixing" the standard library OTOH would involve renaming > and removing names, which would make huge collections of programs break. > Not a good thing :( Yes agreed. My comments there

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Kent Johnson
once seemed to aspired to. > > > > -Original Message- > From: Kent Johnson [mailto:[EMAIL PROTECTED] > Sent: 27 July 2007 14:11 > To: Barton David > Cc: tutor@python.org > Subject: Re: [Tutor] Shelve del not reducing file size > > If it's any sol

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Andreas Kostyrka
d involve renaming and removing names, which would make huge collections of programs break. Not a good thing :( Andreas I know no language that beats this pattern. > > > > -Original Message----- > From: Kent Johnson [mailto:[EMAIL PROTECTED] > Sent: 27 July 2007 14:11 >

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
27;friendliness' it once seemed to aspired to. -Original Message- From: Kent Johnson [mailto:[EMAIL PROTECTED] Sent: 27 July 2007 14:11 To: Barton David Cc: tutor@python.org Subject: Re: [Tutor] Shelve del not reducing file size If it's any solace, there is a small minority of Pyth

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Andreas Kostyrka
reas > > > -Original Message- > From: Kent Johnson [mailto:[EMAIL PROTECTED] > Sent: 27 July 2007 13:07 > To: Barton David > Cc: tutor@python.org > Subject: Re: [Tutor] Shelve del not reducing file size > > Barton David wrote: >> *sigh* I'm r

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Kent Johnson
; > I guess it's not Python's fault: I'm guess I'm just too stupid. But I'm > just getting really disenchanted. Sorry. > > > -Original Message- > From: Kent Johnson [mailto:[EMAIL PROTECTED] > Sent: 27 July 2007 13:07 > To: Barton Dav

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
too stupid. But I'm just getting really disenchanted. Sorry. -Original Message- From: Kent Johnson [mailto:[EMAIL PROTECTED] Sent: 27 July 2007 13:07 To: Barton David Cc: tutor@python.org Subject: Re: [Tutor] Shelve del not reducing file size Barton David wrote: > *sigh* I'm really

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Kent Johnson
Barton David wrote: > *sigh* I'm really going off Python. In what way is it Python's fault that the dbm database doesn't reclaim disk space? Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
*sigh* I'm really going off Python. OK, thanks Andreas. This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University o

Re: [Tutor] Shelve del not reducing file size

2007-07-27 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 That's in the nature of the underlying database library used for the shelve. Most dbm implemention on Unix are using a sparse file that is used as hashmap. E.g. compare ls -l versus du of the database file. Now if this is the case, there is no way (wi

[Tutor] Shelve del not reducing file size

2007-07-27 Thread Barton David
Hi, I've hit a snag with Python's shelve module. By way of example... _ from shelve import DbfilenameShelf as StoreFile import os sf=StoreFile("mytest.db",writeback=False) # but same problem if writeback=True for i in range(1): sf[str(i)]="TESTOBJECT" sf.sync() print len(sf) sf.cl