Re: stripping unwanted chars from string

2006-05-03 Thread Edward Elliott
Bryan wrote: > >>> keepchars = set(string.letters + string.digits + '-.') Now that looks a lot better. Just don't forget the underscore. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-04 Thread Edward Elliott
Michele Simionato wrote: >> >>> A = [] # let's declare a "constant" here >> >>> b = A # and let's assign the constant here >> >>> b.append('1') # OOPS! > > But it makes no sense to use a mutable object for a constant! > The user should use a tuple, Sure. Now show me the builtin immutable equ

Re: noob question: "TypeError" wrong number of args

2006-05-04 Thread Edward Elliott
bruno at modulix wrote: > Edward Elliott wrote: >> Ah, well then, there's no need for a full-blown parser. It should >> suffice to recognize a class definition and modify the parameter list of >> every def indented one level further than that. > > won't

Re: Newbie question on code vetting

2006-05-04 Thread Edward Elliott
[EMAIL PROTECTED] wrote: > I agree with your point, which is why I asked the question. Risk cannot be > eliminated, but it can be understood and managed so that useful work can > still be done. If there is any way I can find out what the commiters do > prior to reaching a decision to accept or reje

Re: Newbie question on code vetting

2006-05-04 Thread Edward Elliott
I have no deep connections to any open source projects. I do however know quite a few engineers. Bear that in mind. [EMAIL PROTECTED] wrote: > It seems to me that Open Source generally would be more pervasive if there > was more transparency with respect to the practices observed within the > p

Re: Newbie question on code vetting

2006-05-06 Thread Edward Elliott
I'm replying to Ben because William's post is no longer on my news server. <[EMAIL PROTECTED]> wrote: > I would like to offer a couple of links to the kind of stuff I am talking > about w.r.t. the "transparency" issue. > First, some from Eclipse: > http://www.eclipse.org/legal/ See especially the

Re: Counterproductive goals (was Re: code vetting)

2006-05-06 Thread Edward Elliott
Apologies to the group for getting so OT here. Thanks for your indulgence. Ben Finney wrote: >> I think both your goal and his (spreading free software at the >> expense of non-free) are counterproductive. > > Huh? A goal is counterproductive? By what do you measure > "counterproductive", if no

Re: Python's regular expression?

2006-05-10 Thread Edward Elliott
bruno at modulix wrote: > From a readability/maintenance POV, Perl is a perfect nightmare. It's certainly true that perl lacks the the eminently readable quality of python. But then so do C, C++, Java, and a lot of other languages. And I'll grant you that perl is more susceptible to the 'executa

Re: Can Python installation be as clean as PHP?

2006-05-10 Thread Edward Elliott
XBello wrote: > It's possible to work with php just with these single file? Maybe I'm > doing the wrong thing, because to start to program I needed to install > a web server too (a large bunch of files). PHP can be run from the command line too. On ubuntu/debian it's available by installing the

Re: syntax for -c cmd

2006-05-11 Thread Edward Elliott
James wrote: > Wrong syntax is shown below. What should be the delimiter before else? > > python -c 'if 1==1: print "yes"; else print "no"' Now this is interesting. I broke the line up into separate arguments and it seemed to work fine: $ python -c 'if 1==1: print "yes"' 'else: print "no"' yes

Re: [ANN] tdir 1.69 Released And Available

2006-05-11 Thread Edward Elliott
Tim Daneliuk wrote: > 'tdir' is a reimplementation and enhancement of the old 'xdir' CP/M > utility from Ancient Times. > > 'tdir' is an advanced directory display utility written in Pure Python, > and runs on both *nix and Win32 systems.\ > > With 'tdir' you can display directories sorted by fi

Re: Nested loops confusion

2006-05-11 Thread Edward Elliott
[EMAIL PROTECTED] wrote: > Call me crazy, but be careful when programming python in different text > editors and in general, ie cutting and pasting, tabing and spacing. > Loops can look fine and not work (try moving around test print > statements for iterators), in this case try re-tabing your inde

Re: python equivalent of the following program

2006-05-11 Thread Edward Elliott
Steven Bethard wrote: > import subprocess > > file1 = open('file1', 'w') > prog1 = subprocess.Popen(['prog1'], stdout=file1) And if the script runs somewhere that stderr is likely to disappear: prog1 = subprocess.Popen(['prog1'], stdout=file1, stderr=subprocess.STDOUT) -- http://mail.python.or

Re: Reg Ex help

2006-05-11 Thread Edward Elliott
Bruno Desthuilliers wrote: > don a écrit : >> Also if there is a better way than using regex, please let me know. > > s ="/main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT > from /main/parallel_branch_1/release_branch_1.0/4" > parts = s.replace(' ', '/').strip('/').split('/')

Re: FTP filename escaping

2006-05-11 Thread Edward Elliott
Serge Orlov wrote: > Almad wrote: >> OK, after some investigation...problem is in non-latin characters in >> filenames on ftp. >> >> Yes, users should be killed for this, > > It's futile, users will always find a way to crash you program :) And > you can't kill them all, there are too many of them

Re: python equivalent of the following program

2006-05-11 Thread Edward Elliott
AndyL wrote: > Edward Elliott wrote: >> And if the script runs somewhere that stderr is likely to disappear: >> >> prog1 = subprocess.Popen(['prog1'], stdout=file1, >> stderr=subprocess.STDOUT) > > Forgot to mention before that the main motivation is

Re: syntax for -c cmd

2006-05-11 Thread Edward Elliott
Dennis Lee Bieber wrote: > On Thu, 11 May 2006 20:12:55 GMT, Edward Elliott <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> If putting the else in a separate arg unbinds it from the if, I would >> expect a syntax error. If OTOH naked elses

Re: Threads

2006-05-11 Thread Edward Elliott
e gets populated >> again. Is this possible ? >> > Did you read the documentation for Queue methods? > > x = q.get(true) #blocks until data is available Like a good lawyer, Dennis knows the answer before he asks the question. -- Edward Elliott UC Berkeley School of Law

Re: syntax for -c cmd

2006-05-12 Thread Edward Elliott
Fredrik Lundh wrote: > hint: > > $ python -c 'import sys; print sys.argv' 'else: print "no"' > > Yeah the man page knows all. About the only time I use python on the command line is with the timeit module, which evals all arguments given.

Re: Reg Ex help

2006-05-12 Thread Edward Elliott
bruno at modulix wrote: > parts = s.replace(' ', '/').strip('/').split('/') > branch = parts[parts.index('CHECKEDOUT') - 1] > > Edward Elliott wrote: >> >> marker = s.index('/CHECKEDOUT') >> branch = s [s

Re: [OT] Unix Tools (was: deleting texts between patterns)

2006-05-12 Thread Edward Elliott
Dan Sommers wrote: > Or even > > awk '/abc/,/xyz/' file.txt > > Excluding the abc and xyz lines is left as an exercise to the > interested reader. Once again, us completely disinterested readers get the short end of the stick. :) -- Edward Elliott UC Berkel

Re: Python Translation of C# DES Encryption

2006-05-12 Thread Edward Elliott
ke the key scheduling routines, but that's less likely. Until you know exactly what the original code does, your only option is trial and error. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-12 Thread Edward Elliott
ol. So rebinding/overshadowing a "constant" A would raise an error, but mutating the underlying object A refers to would not (unless it too were immutable). As far objects themselves, adding an ability to make any object immutable regardless of type is exactly what he suggests. --

Re: How to get a part of string which follows a particular pattern usingshell script

2006-05-12 Thread Edward Elliott
ndard library. New modules aren't just thrown in there willy-nilly. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: compiling module from string and put into namespace

2006-05-12 Thread Edward Elliott
glomde wrote: > Tanks but that isn't what I am looking for. > I really want a function that you can call and imports > the module into the calling functions namespace. > > I dont want the caller to call import but a function. come again? >>> type (__builtins__.__im

Re: unzip zip files

2006-05-12 Thread Edward Elliott
ot;-d" zip's parameter in man zip. or change the working dir before calling unzip. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: compiling module from string and put into namespace

2006-05-13 Thread Edward Elliott
ce. Ok got it now. I'm sure it's doable but it sounds tricky. Wouldn't it be easier to just have your function return a list of modules to the caller and have the caller import them? -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -

Re: distributing a app frozen by cx_freeze

2006-05-13 Thread Edward Elliott
Flavio wrote: > ImportError: /home/flavio/freeze/qt.so: undefined symbol: > _ZNK9QSGIStyle9classNameEv > So my question is: is there a way to find out exactly which lib is > missing ? yes - find the one with that symbol. wash, rinse, repeat. ;) -- Edward Elliott UC Berkeley S

Re: Question regarding checksuming of a file

2006-05-13 Thread Edward Elliott
n.org/lib/module-md5.html -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: copying files into one

2006-05-13 Thread Edward Elliott
#x27;name's instead? in either case, calling os.path.join with one argument is pointless. > # CODE 1 this does not work > tx = infile.read(1000) > if tx == "": break > combined.write(tx) > infile.close() hint: where will break take you? therein

Re: copying files into one

2006-05-13 Thread Edward Elliott
arn to use pdb before posting your code for the group to debug. this type of error is easily catchable with a little effort. you'll learn more by investigating your problems yourself before feeding them to the great distributed debugger known as comp.lang.python. -- Edward Elliott UC Berkeley S

Re: send an email with picture/rich text format in the body

2006-05-14 Thread Edward Elliott
idth font -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

help using smptd

2006-05-14 Thread Edward Elliott
ore/asynchat, but I didn't find what I wanted there either. import smtpd class SMTPProxy (smtpd.SMTPServer): def process_message (self, peer, mailfrom, rcpttos, data): # my code here proxy = SMTPProxy (listen_addr, relay_addr) # now what? -- Edward Elliott UC Berkeley School of

Re: Named regexp variables, an extension proposal.

2006-05-14 Thread Edward Elliott
match of a comma separated list is > lost, e.g: > r"[a-zA-Z_]\w+[,[a-zA-Z_]\w+]" That's why god invented % interpolation. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: help using smptd

2006-05-14 Thread Edward Elliott
doesn't define its own init either and it shows the same behavior as my class: binds to the port but doesn't respond to connections. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs versus Spaces in Source Code

2006-05-14 Thread Edward Elliott
t;WTF?" Sounds like the problem is your editor, not tabs. But I wouldn't rule out PEBCAK either. ;) > Undoubtedly adding the second spark to the holy war, Undoubtedly. Let's keep it civil, shall we? And please limit the cross-posting to a minimum. (directed at the group,

Re: help using smptd

2006-05-14 Thread Edward Elliott
Edward Elliott wrote: > import smtpd > > class SMTPProxy (smtpd.SMTPServer): > def process_message (self, peer, mailfrom, rcpttos, data): > # my code here > > proxy = SMTPProxy (listen_addr, relay_addr) > # now what? Update: I think I've solved i

Re: Tabs versus Spaces in Source Code

2006-05-15 Thread Edward Elliott
h you that the latter is way too much hassle to even attempt. All I'm saying is that using tabs on their own is perfectly viable and a bit cleaner. I'm not trying to force that preference on anyone else, just get everyone to recognize that one is just as rational and salubr

Re: Tabs versus Spaces in Source Code

2006-05-15 Thread Edward Elliott
a line departs more than one tab indentation level from its neighbors. It's not perfect, but it eliminates the worst offenses. Good enough often is. Not saying you should do this, just pointing out how tabs are viable. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs versus Spaces in Source Code

2006-05-16 Thread Edward Elliott
. Before you object that modern languages don't use gotos, think again. Break and continue are merely restricted forms of goto, as are exceptions. Don't throw the baby out with the bathwater. Make better tools that allow the good uses and prevent the bad. -- Edward Elliott UC Berkeley S

Re: Tabs versus Spaces in Source Code

2006-05-16 Thread Edward Elliott
achates wrote: > With spaces for indentation, this just isn't possible, because I have > to conform to your viewing preferences, and that makes me unhappy. Why > would you want to make me unhappy? +5 QOTW -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at

python vs perl lines of code

2006-05-16 Thread Edward Elliott
if any? I'm interested in properties of the code itself, not performance. And just what is the question to the ultimate answer to life, the universe, and everything anyway? ;) -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: python vs perl lines of code

2006-05-16 Thread Edward Elliott
John Bokma wrote: > Edward Elliott <[EMAIL PROTECTED]> wrote: > >> This is just anecdotal, but I still find it interesting. Take it for >> what it's worth. I'm interested in hearing others' perspectives, just >> please don't turn this into a pi

Re: any plans to make pprint() a builtin?

2006-05-16 Thread Edward Elliott
l namespace yourself just as easily. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: do/while structure needed

2006-05-16 Thread Edward Elliott
necessary. But I'd argue against it on grounds of simplicity and readability instead of confusion. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: common practice for creating utility functions?

2006-05-16 Thread Edward Elliott
n being forces you to get more clarity. And then later on, you can maintain, modify, and port your programs to other platforms much more easily. Even if your only audience is yourself, everything gets better." http://www-cs-faculty.stanford.edu/~knuth/ http://www-cs-faculty.stanford.edu/~uno/l

Re: common practice for creating utility functions?

2006-05-16 Thread Edward Elliott
e to do" part, remember that Python's function calls are > rather expansive... Indeed, their expansiveness makes them great. Unfortunately they're somewhat expensive too. ;) -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: using target words from arrays in regex, pythons version of perls 'map'

2006-05-16 Thread Edward Elliott
John Machin wrote: > Would you believe "steps 3 & 4"? How about "two pops and a pass?" Quick! Lower the cone of silence! -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: [silly] Does the python mascot have a name ?

2006-05-16 Thread Edward Elliott
Carl J. Van Arsdall wrote: > Well, we could call the perl camel Joe but I don't know if the perlcores > (read: hardcore PERL users) would be down for that ;) Hmmm. Perl is like smoking, it feels great and gives you cancer. Yes, there's definitely potential here. ;) -- E

Re: python vs perl lines of code

2006-05-16 Thread Edward Elliott
tuation. I'll grant you though, asking for non-value-judgement-laden anecdotes on newsgroups may be asking too much. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: python vs perl lines of code

2006-05-16 Thread Edward Elliott
but a really really good idea). -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Edward Elliott
achates wrote: > Jorge Godoy wrote > >>Emacs guess what's used in the file and allows me to use tabs all the >>time, doing the correct thing... > > That sounds like useful behaviour. vim can do it to. http://www.vim.org/scripts/script.php?script_id=1171 -- Edwa

Re: Tabs are EVIL *and* STUPID, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Edward Elliott
enough. How much code is viewed with less and cat, and how much > is viewed using smart viewers/editors? I think the majority is viewed > using the latter. Just for the sake of completeness: cat file |sed 's/\t//g' less -x4 file vim ~/bin.cat #!/bin/sh cat "$@"

Re: python vs perl lines of code

2006-05-17 Thread Edward Elliott
That always has value, even when it's wrong. By the looks of it, this group is uninterested in the discussion. Which is fine. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: python vs perl lines of code

2006-05-17 Thread Edward Elliott
John Bokma wrote: > Edward Elliott <[EMAIL PROTECTED]> wrote: >> Evaluating my experiences yes, relating your own no. > > What would the point be? Most important to me would be: am I happy with > the result? And that rarely has to do with the number of lines of actual &

Re: Tabs are EVIL *and* STUPID, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Edward Elliott
Dave Hansen wrote: > On Wed, 17 May 2006 17:28:26 GMT in comp.lang.python, Edward Elliott >>Just for the sake of completeness: >> >>cat file |sed 's/\t//g' > > That doesn't always work. If you don't see why, you don't understand > my

Re: python vs perl lines of code

2006-05-17 Thread Edward Elliott
ement (because he hardwired everything > into a chip). That doesn't lead us to any greater understanding of > anything though. Of course. Extreme cases are just that. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: python vs perl lines of code

2006-05-17 Thread Edward Elliott
thing to me isn't what could one do, it's what are people actually doing in the real world? -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: python vs perl lines of code

2006-05-17 Thread Edward Elliott
y conclusions, but asking the questions is good. > The real important question is: what has perl done in > the last five years to make writing these scripts easier? That's another very good question. One I can't answer. -- Edward Elliott UC Berkeley School of Law (Boalt Ha

Re: Tabs are EVIL *and* STUPID, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Edward Elliott
William Studenmund wrote: > The problem is that tabs take you to the next tab stop, they don't > expand to a fixed number of spaces. Got it. You're talking about using tabs other than for initial line indentation on a source file. Yes, then tab expansion is not perfect. -- E

Re: Tabs are EVIL *and* STUPID, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Edward Elliott
difference in the original > editor. Sure, mixed tabs and spaces were not part of my use case. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs versus Spaces in Source Code ('semantic' vs. arbitrary indentation)

2006-05-17 Thread Edward Elliott
7;t appreciate the benefits that tab indentation would bring to his > own language - the only major language in which indentation levels > actually have semantic significance. Fate is a cruel mistress. Or maybe just a heartless bitch. Either way, watch your back. -- Edward Elliott UC B

Re: python vs perl lines of code

2006-05-17 Thread Edward Elliott
Michael Tobis wrote: > Edward also asked if others had similar experiences. If others did, the > assemblage of their opinions would in fact consttitute data. I have no > idea why people are giving him such grief over this request. Thank you, Michael. It was starting to feel like I'

Re: python vs perl lines of code

2006-05-17 Thread Edward Elliott
statistics by accumulating a vast number of such observations over time. In any case, I never asked for scientific-quality data in the first place. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: python vs perl lines of code

2006-05-17 Thread Edward Elliott
rse of available data. No one's saying anecdotes are 100% reliable. But they aren't 0% reliable either. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs versus Spaces in Source Code ('semantic' vs. arbitrary indentation)

2006-05-18 Thread Edward Elliott
Christophe wrote: > No, it's really easy : a simple precoomit hook which will refuse any .py > file with the \t char in it and it's done ;) $ echo \t t Why would you wan_ _o remove all _ee charac_ers? Isn'_ _ha_ a li__le awkward? -- Edward Elliott UC Berkeley Scho

Re: python vs perl lines of code

2006-05-18 Thread Edward Elliott
The more people post their own experiences, the more patterns emerge and testable hypotheses form, which can then be confirmed or debunked with further study. The journey of 1000 miles starts with a single step, etc, etc. Didn't your mother ever tell you how science works? It's not a

Re: python vs perl lines of code

2006-05-18 Thread Edward Elliott
rt what they see. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: python vs perl lines of code

2006-05-18 Thread Edward Elliott
rt what they see. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: python vs perl lines of code

2006-05-18 Thread Edward Elliott
us anything about typical code in the wild. Producing more data points _will_ tell us that. If my data are an outlier, they may be worthless anyway. That's what I'm interested in. Others are interested in analyzing my code. Which is fine, it's just not what I'm af

Re: python vs perl lines of code

2006-05-19 Thread Edward Elliott
Terry Hancock wrote: > Edward Elliott wrote: > >>For inquiries into real-world code, it's enough to >>believe that I'm not lying >> > So I don't make assumptions about people without some kind > of evidence. There *are* plenty of "bad guys&quo

Re: python vs perl lines of code

2006-05-19 Thread Edward Elliott
anguage to measure it. If anyone can provide such a beast, I'll gladly run it against my code. In the meantime, line/char counts are the best I've got. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: python vs perl lines of code

2006-05-19 Thread Edward Elliott
John Bokma wrote: > Edward Elliott <[EMAIL PROTECTED]> wrote: > >> The question is how to count explicit names like module.class.func; >> should that be 1 identifier or 3? Counting as 3 would reward things >> like "from X import *" which are generally f

Re: python vs perl lines of code

2006-05-19 Thread Edward Elliott
John Bokma wrote: > Edward Elliott <[EMAIL PROTECTED]> wrote: > >>>> like "from X import *" which are generally frowned on in python while >>>> 'use MOD qw(id)' is encouraged in perl. >>> >>> Not by me, and I doubt it i

Re: python vs perl lines of code

2006-05-20 Thread Edward Elliott
A little out-of-order execution seems useful here. ;) John Bokma wrote: > Edward Elliott <[EMAIL PROTECTED]> wrote: >> I can readily believe that the "community" frequenting the newsgroups, >> mailing lists, and blogs don't encourage it anymore. But t

Re: [silly] Does the python mascot have a name ?

2006-05-20 Thread Edward Elliott
re all object types without names to identify individual instances. "Ed's chair" and "John's blue car" aren't names to me, just descriptions. It's like saying "that temporary object on line 24 of function foo". Really, how many things *do* have n

Re: python vs perl lines of code

2006-05-20 Thread Edward Elliott
John Bokma wrote: > Edward Elliott <[EMAIL PROTECTED]> wrote: > >> A little out-of-order execution seems useful here. ;) > > No, not interested in a pissing contest. Your statement that the Perl > community encourages importing is *encouraged* (over using OO without

Re: python vs perl lines of code

2006-05-20 Thread Edward Elliott
course. It's getting dangerously close to flaming at this point, which indicates it's time to go offline. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: python vs perl lines of code

2006-05-20 Thread Edward Elliott
the way you suggest. I'm all ears if you have another metric I can test as easily. > I understand what you are trying to say, but I can't support your > conclusions as presented. What would those be? I tried hard not draw any conclusions. I just want to see how other people

Re: misleading prefix ++

2006-05-20 Thread Edward Elliott
ch leads us to: >>>> i > 0 >>>> +i > 0 >>>> +i > 1 >>>> +i > 1 >>>> +i > 2 Now that is absolutely lovely. Looks like it's time to join the ranks of Perl and C with an Obfuscated Python Contest. ;) -- Edward Elliott UC

Re: How to tell if function was passed a list or a string?

2006-05-20 Thread Edward Elliott
gt;print "foo is not a string" Another way: if getattr (foo, 'isalpha', False): print 'foo is a string' Of course now string duck types must have an 'isalpha' and list ones can't, but that shouldn't matter much. -- Edward Elliott UC Berkel

Re: Feature request: sorting a list slice

2006-05-20 Thread Edward Elliott
John Machin wrote: > Use case? quicksort! :) -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: dict!ident as equivalent of dict["ident"]

2006-05-21 Thread Edward Elliott
To avoid parsing ambiguity, identifier can only contain (as the name implies) alphanumerics and _. So your ! is limited not only to dicts but to certain keys in certain dicts. More complicated than it's worth. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at ed

Re: Iterators: Would "rewind" be a good idea?

2006-05-21 Thread Edward Elliott
are different from iterating in reverse. Namely, the former let's you move back and forth at will in a sequence, while the latter is just a one-way street from back to front. My knowledge of Python's iterators is kind of sketchy, so I may have missed something. -- Edward Elliott UC Berkel

Re: Programming language productivity

2006-05-21 Thread Edward Elliott
But there's still the problem of overcounting string literals. Line counts are simple to compute and it's easier to agree on which lines to count. Thus their popularity. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-21 Thread Edward Elliott
ut it needs to be flexible. The proposed syntax is short, intuitive, and consistent with comprehension/generator syntax. I'd say it's entirely in keeping with a number of rules which trump 'one way': Beautiful is better than ugly. Flat is better than nested. Readability

Re: Iterators: Would "rewind" be a good idea?

2006-05-21 Thread Edward Elliott
Roy Smith wrote: > Edward Elliott <[EMAIL PROTECTED]> wrote: >> This is why the C++ STL has independent forward and backward iterator >> types. > > Let me see if I can paraphrase the difference between the Python design > philosophy and the C++ design philosophy a

Re: Python - Web Display Technology

2006-05-21 Thread Edward Elliott
is feature can be used for a web-based CMS! It would blow-away > anything (non-Java) now available for managing and uploading assets. > - Show quoted text - Ugh, definitely astroturf. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: Python - Web Display Technology

2006-05-21 Thread Edward Elliott
#x27;re website starts winning design awards, be afraid. Be very afraid." Unfortunately I can't locate proper attribution. It may have been Jakob Nielsen. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

Re: The ONE TRUE WAY to use tabs (if you must...)

2006-05-21 Thread Edward Elliott
t; at least in the simple cases i've tried) > > Frankly, the case for tab usage is not that compelling... Quoting usenet posts is like hunting buffalo: only take what you need. http://www.xs4all.nl/~wijnands/nnq/nquote.html#Q2 -- Edward Elliott UC Berkeley School of Law (Boalt Ha

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-22 Thread Edward Elliott
bruno at modulix wrote: > Edward Elliott wrote: >> You mean like this: >> >> s = "foo" + "bar" >> s = 'foo' + 'bar' >> s = 'foo' 'bar' >> s = '%s%s' % ('foo', 'bar')

Re: Python - Web Display Technology

2006-05-22 Thread Edward Elliott
Flash. Usability problems aren't just an artifact of the implementation, they're part of Flash's design. -- Edward Elliott UC Berkeley School of Law (Boalt Hall) complangpython at eddeye dot net -- http://mail.python.org/mailman/listinfo/python-list

epydoc 3.0 released

2008-01-29 Thread Edward Loper
m identifiers back into the documentation. For more details about what's new in Epydoc 3.0, see: http://epydoc.sourceforge.net/whatsnew.html ------ Edward Loper [EMAIL PROTECTED] h

Help with Tkinter on OS X --- driving me insane!

2009-05-17 Thread Edward Grefenstette
reatly appreciate any assistance the community can provide on the matter. Best, Edward -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with Tkinter on OS X --- driving me insane!

2009-05-17 Thread Edward Grefenstette
I thought of this. I uninstalled Tk from macports, but the same error crops up. Evidently, Tk 8.5 remains installed somewhere else, but I don't know where. How can I find out? Best, Edward > > > Have you installed Tk version 8.5? > > If so, remove it. You might also in

Re: Help with Tkinter on OS X --- driving me insane!

2009-05-17 Thread Edward Grefenstette
/Tk.framework/Versions/8.4/Headers/tk.h === Whereas Tk 8.5 is installed in: === /Library/Frameworks/Tk.framework/Versions/8.5/ === Which ones should I delete? Should I remove all the other tk.h files? Sorry if these are rather dumb questions, but I really do appreciate the help. Best, Edward On

Re: Help with Tkinter on OS X --- driving me insane!

2009-05-17 Thread Edward Grefenstette
Bingo! Updating to Python 6.2.2 did the trick (I had 6.2). I just had to relink the /usr/bin/python to the Current directory in /Library/ Frameworks/Python.framework/Versions/ and everything worked without deletions etc. Thanks for your help, everyone! Best, Edward -- http://mail.python.org

LaTeXing python programs

2009-05-20 Thread Edward Grefenstette
ty are. Cheers, Edward -- http://mail.python.org/mailman/listinfo/python-list

Re: LaTeXing python programs

2009-05-20 Thread Edward Grefenstette
On May 20, 10:10 pm, John Reid wrote: > Alan G Isaac wrote: > > The listings package is great and highly configurable. > > Note that you can also input entire files of Python code > > or pieces of them based on markers.  Really quite great. > > I tried listings. I believe pygments makes better for

Re: Ideas for master's thesis

2008-06-03 Thread Edward Bugbee
On Jun 3, 2008, at 2:35 PM, Andrii V. Mishkovskyi wrote: 2008/6/4 Larry Bugbee <[EMAIL PROTECTED]>: I would like to do something with this language, yet I don't know if there are any needs/science fields, that could be used as a basis for a thesis. Personally, I'd like to see *optional* d

<    1   2   3   4   5   6   >