Re: [Tutor] tarfile +stdin

2006-12-19 Thread wesley chun
> >>> tbz.add(sys.stdin) > Traceback (most recent call last): >File "", line 1, in > : > return s.startswith('/') > AttributeError: 'file' object has no attribute 'startswith' altho i cannot help you with your original query, i *can* tell you that the reason why you ge

Re: [Tutor] Data hiding in Python.

2006-12-19 Thread Andreas Kostyrka
* Jonathon Sisson <[EMAIL PROTECTED]> [061219 21:45]: > > > My vote is, no, not worth the trouble. It's Java / C++ / static-typing / > > put-the-client-in-a-straightjacket-so-they-don't-touch-anything thinking. > > > > Heh...and don't forget the king-pin of them all, C#. Between private, > pu

Re: [Tutor] Best method for filtering lists in lists...

2006-12-19 Thread John Fouhy
On 17/12/06, Alan Gauld <[EMAIL PROTECTED]> wrote: > As for Luke's point about the speed of conversion, I'm not > sure how that would stack up. I have a gut feel that it might > be faster than trying to compare the lists element by > element, that sounds like an algebraic expansion with list > size

Re: [Tutor] Data hiding in Python.

2006-12-19 Thread Alan Gauld
"Alan Gauld" <[EMAIL PROTECTED]> wrote > public/private is overkill. I actually like the Delphi 2 model > (they have since added protected etc) was a good compromise > where implementation section(*) attributes Oops! I meant to add a footnote here that explained that Delphi modules comprise tw

Re: [Tutor] Best method for filtering lists in lists...

2006-12-19 Thread Chris Hengge
If it adds to the fun, does it make a difference if I tell you that this will be looking through [0][0] - approx [0][6544] On 12/16/06, Alan Gauld <[EMAIL PROTECTED]> wrote: "Roel Schroeven" <[EMAIL PROTECTED]> wrote >> In that case put the inner lists in a Set. That will eliminate >> duplica

Re: [Tutor] Data hiding in Python.

2006-12-19 Thread Jonathon Sisson
Alan Gauld wrote: > but also enforces that intent. This is espectially important > during the early development of libraries where the internal > representation is constantly evolving. Yeah, I would have to agree with you there. I hadn't considered that angle... > But multiple languages compili

Re: [Tutor] Data hiding in Python.

2006-12-19 Thread Alan Gauld
"Jonathon Sisson" <[EMAIL PROTECTED]> wrote > As a side note, does anyone have a good argument for access level > controls like C#? These kinds of controls do help in large projects with many teams, often geographically dispersed. It is a form of documentation about the intent of the class desig

Re: [Tutor] Data hiding in Python.

2006-12-19 Thread Jonathon Sisson
> My vote is, no, not worth the trouble. It's Java / C++ / static-typing / > put-the-client-in-a-straightjacket-so-they-don't-touch-anything thinking. > Heh...and don't forget the king-pin of them all, C#. Between private, public, protected, internal, and protected internal I lose track of wh

Re: [Tutor] Data hiding in Python.

2006-12-19 Thread Kent Johnson
Don Taylor wrote: > I am working my way through 'wxPython in Action' by Noel Rappin and > Robin Dunn and came across this comment about data hiding in their > explanation of the MVC pattern: > > ".. the View... should never get to see the private internals of the > Model. Admittedly, this is d

[Tutor] tarfile +stdin

2006-12-19 Thread Martin Marcher
Hello, I'm trying to create a backup script which in one of the last steps is to create a tarball that is possibly gzipped or bzipped2. >>> import tarfile >>> tbz = tarfile.open(name="tarfile.tar.bz2", mode="w:bz2") >>> tbz.add("myfile.dmp") >>> for tarinfo in tbz: ... print tarinfo.name

Re: [Tutor] Ftp files

2006-12-19 Thread Python
On Tue, 2006-12-19 at 07:11 -0800, ray sa wrote: > Hi > > I have just started to learn Python and think it is a superb language. > I am faced with an issue that I would like some help with. I need to > fetch files on a daliy basis from a unix machine. I would like to run > a batch command for th

[Tutor] Ftp files

2006-12-19 Thread ray sa
Hi I have just started to learn Python and think it is a superb language. I am faced with an issue that I would like some help with. I need to fetch files on a daliy basis from a unix machine. I would like to run a batch command for this. I would also like to automate this task. The files

Re: [Tutor] MVC/MVP examples of how to implement it

2006-12-19 Thread Don Taylor
Basil Shubin wrote: > Hi friends! > > I have read articles about MVC/MVP, but still can't get a clue to how > implement it in really working application :-( Because I better > understand with ready to use examples, can you provide link to free > python+GUI application which implements MVC/MVP d

Re: [Tutor] MVC/MVP examples of how to implement it

2006-12-19 Thread Alan Gauld
"Don Taylor" <[EMAIL PROTECTED]> wrote in >> > This is the best description - by far - that I have seen for the MVC > pattern. > > http://groups.google.ca/group/comp.lang.python/msg/f8990a2c666a793c?hl=en&; > You are right, that's a very good description, especially given it's all text and no dia