Re: directory listing

2005-11-11 Thread Michael Konrad
Sorry about that, I guess send was working. Michael Konrad wrote: > > This is what I decided on for a solution. I haven't tested it > cross-platform yet. > > import os > > def dirListing(directory='/Users/mkonrad'): > """Returns a list of directories.""" > #variables > d

Re: Python obfuscation

2005-11-11 Thread Steven D'Aprano
On Thu, 10 Nov 2005 21:41:52 -0800, Alex Martelli wrote: >> Obfuscation has it's place. > > What I think of this thesis is on a par of what I think of this way of > spelling the possessive adjective "its" (and equally unprintable in > polite company). Aside: given that "it's" is "it is", how wou

Re: list of lambda

2005-11-11 Thread Bengt Richter
On Sat, 12 Nov 2005 14:55:31 +1100, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >On Sat, 12 Nov 2005 00:17:59 +0100, jena wrote: > >> hello, >> when i create list of lambdas: >> l=[lambda:x.upper() for x in ['a','b','c']] >> then l[0]() returns 'C', i think, it should be 'A' > >What is wrong with j

Re: Dynamically Update Class Definitions?

2005-11-11 Thread Chris Spencer
Alex Martelli wrote: > <[EMAIL PROTECTED]> wrote: > > >>Is there a way to loop through all instantiated objects and update >>their classes when a source file changes? I know about Michael Hudson's >>method >>(http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164), but >>you have to modif

Re: Python obfuscation

2005-11-11 Thread Mike Meyer
My, we're about to get *seriously* off topic. Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Fri, 11 Nov 2005 11:17:43 -0500, Mike Meyer wrote: >>> I'd just like to make it non-trivial to make or use additional copies. >> How do you do that without infringing my fair use rights? > And that is th

Re: Dynamically Update Class Definitions?

2005-11-11 Thread Chris Spencer
Chris Spencer wrote: > Alex Martelli wrote: >> If you're in no hurry, you COULD loop over all of gc.get_objects(), >> identify all those which are instances of old_class and "somehow" change >> their classes to new_class -- of course, x.__class__ = new_class may >> well not be sufficient, in which

Re: Python obfuscation

2005-11-11 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Thu, 10 Nov 2005 21:41:52 -0800, Alex Martelli wrote: > > >> Obfuscation has it's place. > > > > What I think of this thesis is on a par of what I think of this way of > > spelling the possessive adjective "its" (and equally unprintable in > > poli

Re: Dynamically Update Class Definitions?

2005-11-11 Thread Jean-Paul Calderone
On Sat, 12 Nov 2005 06:24:57 GMT, Chris Spencer <[EMAIL PROTECTED]> wrote: >Chris Spencer wrote: >> Alex Martelli wrote: > >>> If you're in no hurry, you COULD loop over all of gc.get_objects(), >>> identify all those which are instances of old_class and "somehow" change >>> their classes to new_cl

Re: [ x for x in xrange(10) when p(x) ]

2005-11-11 Thread Peter Otten
[EMAIL PROTECTED] wrote: > However, I found something interesting which I don't quite understand : > > list((x for x in [1,2,3] if x<2 or stop())) works > > but > > a = [ x for x in [1,2,3] if x <2 or stop() ] doesn't. Here's how Carl Banks explained it to me when Bengt came up with this tric

Re: changeing users on linux

2005-11-11 Thread darkchild50
the password is for loging into root -- http://mail.python.org/mailman/listinfo/python-list

Re: Python obfuscation

2005-11-11 Thread The Eternal Squire
Without copyright, how could one possibly earn a living writing a novel? And I submit that many ISD's are only a single person burning with that one software idea of a lifetime, the equivalent of the Great American Novel. Are we to punish that impulse by denying that person a legal monopoly on t

Re: What do you use as symbols for Python ?

2005-11-11 Thread Peter Otten
Daniel Evers wrote: > I mixed this with the class-version and created a new class derived from > "str" for easier printing and added an iterator: > > --- > > class Enum: > class Type(str): > def __init__(self, name): > self.__name = name >

<    1   2   3