Re: merits of Lisp vs Python

2006-12-12 Thread Raffael Cavallaro
On 2006-12-12 19:18:10 -0500, "George Sakkis" <[EMAIL PROTECTED]> said: > If you mistakenly select an extra parenthesis or omit one, it's > the same thing. Because you can't mistakenly select an extra paren or omit one in a lisp-aware editor. Whether its a commercial lisp IDE or emacs, you don'

Re: how can i write a hello world in chinese with python

2006-12-12 Thread kernel1983
and I tried unicode and utf-8 I tried to both use unicode&utf-8 head just like "\xEF\xBB\xBF" and not to use Anyone knows about the setting in the python code file? Maybe python doesn't know I'm to use chinese?! On 12月13日, 下午12时47分, "bearsprite" <[EMAIL PROTECTED]> wrote: > try unicode? > > "kern

Re: Is anyone using Python for embedded applications?

2006-12-12 Thread Hendrik van Rooyen
"Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote: > I'm aware of a couple python projects for embedded systems. I am > currently considering using Python on an embedded platform to develop a > simple application as a personal project, mostly to see if it will > work. I was wondering if anyon

Re: not a big deal or anything, but, curiously:

2006-12-12 Thread Gabriel Genellina
At Wednesday 13/12/2006 03:14, Simon Schuster wrote: gc = float(count(cds, 'g') + count(cds, 'c'))/ len(cds) which should yield: 0.54460093896713613.. but when I ran it I got: 0.544600938967 looking now I see it's truncating after a certain number of decimal places. any ideas why? Floating

Re: merits of Lisp vs Python

2006-12-12 Thread Kaz Kylheku
Bill Atkins wrote: > (Why are people from c.l.p calling parentheses "brackets"?) Because that's what they are often called outside of the various literate fields. -- http://mail.python.org/mailman/listinfo/python-list

Re: not a big deal or anything, but, curiously:

2006-12-12 Thread Tim Peters
[Simon Schuster] > following this tutorial, Which tutorial? > I copied and pasted: > > from string import * > > cds = """atgagtgaacgtctgagcattagctccgtatatcggcgcacaaa > tttcgggtgccgacctgacgcgcccgttaagcgataatcagtttgaacagctttaccatgcggtg > ctgcgccatcaggtggtgtttctacgcgatcaagctattacgccgcagcagca

Re: Setting application-wide global datetime format

2006-12-12 Thread Gabriel Genellina
At Wednesday 13/12/2006 03:08, Sanjay wrote: Being an amateur in python, I am unable to find a way (if there is any) to set a datetime display format once globally in a web application (using turbogears), so that everytime I don't have to use routines like strftime. Try a specific group, like

not a big deal or anything, but, curiously:

2006-12-12 Thread Simon Schuster
following this tutorial, I copied and pasted: from string import * cds = """atgagtgaacgtctgagcattagctccgtatatcggcgcacaaa tttcgggtgccgacctgacgcgcccgttaagcgataatcagtttgaacagctttaccatgcggtg ctgcgccatcaggtggtgtttctacgcgatcaagctattacgccgcagcagcaacgcgcgctggc ccagcgggcgaattgcatattcaccctgttta

Setting application-wide global datetime format

2006-12-12 Thread Sanjay
Hi All, Being an amateur in python, I am unable to find a way (if there is any) to set a datetime display format once globally in a web application (using turbogears), so that everytime I don't have to use routines like strftime. Seeking help. thanks sanjay -- http://mail.python.org/mailman/li

Re: merits of Lisp vs Python

2006-12-12 Thread mystilleef
Paddy wrote: > Robert Uhl wrote: > > > Steven D'Aprano <[EMAIL PROTECTED]> writes: > > > > > > Speaking as somebody who programmed in FORTH for a while, that doesn't > > > impress me much. Prefix/postfix notation is, generally speaking, more > > > of a pain in the rear end than it is worth, even i

Can we run a script in gmail when it's openning, for example, the javascript or python script or any other!

2006-12-12 Thread boyeestudio
I feel like uploading a attachment using remote uploading in gmail. I'm here (command) / / (getting file) [gmail]<->(remote) I just send a command to the gmail(where I send a mail and it contains some script which can run directly in gmail),then the scrip

Re: merits of Lisp vs Python

2006-12-12 Thread [EMAIL PROTECTED]
> greg <[EMAIL PROTECTED]> writes: > > >> A compiler shifts a lot of decisions that an > >> interpreter would have to make at runtime to compile-time. There is > >> no reason a dynamic language can't enjoy this efficiency. > > > > I'm not saying that it's impossible to compile > > Python, only tha

Re: How to turn of the monitor by python?

2006-12-12 Thread could . net
Thank you, that's exactly what I want. Sorry I didn't give my OS info. Leo Kislov wrote: > [EMAIL PROTECTED] wrote: > > I want to turn off my monitor from within python, How to do it? > > Thanks! > > Do you realize that hardware management and control is OS dependant? > When asking such questions

Re: merits of Lisp vs Python

2006-12-12 Thread Robert Brown
Paul Rubin writes: > Robert Brown <[EMAIL PROTECTED]> writes: >> Luckily, Willem Broekema has written a Python to Lisp compiler called >> clpython that can be consulted to answer questions like these. >> >> http://trac.common-lisp.net/clpython/ > > Does this count as

Re: merits of Lisp vs Python

2006-12-12 Thread Bill Atkins
I V <[EMAIL PROTECTED]> writes: > On Sun, 10 Dec 2006 03:18:07 -0500, Bill Atkins wrote: >> We're not counting lines here, you goon. We're talking about how >> expressive constructs are and how closely they match your concept of >> what you want to do. The conditional example is lower-level; you

python-dev Summary for 2006-11-16 through 2006-11-30

2006-12-12 Thread steven . bethard
python-dev Summary for 2006-11-16 through 2006-11-30 .. contents:: [The HTML version of this Summary is available at http://www.python.org/dev/summary/2006-11-16_2006-11-30] = Announcements =

Re: binary input and memory address passing

2006-12-12 Thread Scott David Daniels
Eric Carlson wrote: > Hello, > > I can open, read, and convert data to a numeric (double) array from a > binary file using > > nc = #something given > nr = #something given > f_o=open('junk.bin','rb') > x=reshape(array('d',f_o.read()),(nr,nc)) > > Is there a way in python that gives better perf

Re: merits of Lisp vs Python

2006-12-12 Thread Bill Atkins
Paul Rubin writes: > Pascal Costanza <[EMAIL PROTECTED]> writes: >> May you have tried the wrong Lisp dialects so far: >> >> (loop for i from 2 to 10 by 2 >>do (print i)) > > The loop language is so complicated and confusing that I never > bothered trying to lea

Re: merits of Lisp vs Python

2006-12-12 Thread Bill Atkins
greg <[EMAIL PROTECTED]> writes: >>>Having edited both Lisp and Python code fairly >>>extensively, >> >> How extensively? > > Enough to know what I'm talking about. Tens > of thousands of lines of Lisp and Scheme, and > hundreds of thousands of lines of Python, I > would estimate. > > Seeing as yo

Re: merits of Lisp vs Python

2006-12-12 Thread Bill Atkins
greg <[EMAIL PROTECTED]> writes: >> A compiler shifts a lot of decisions that an >> interpreter would have to make at runtime to compile-time. There is >> no reason a dynamic language can't enjoy this efficiency. > > I'm not saying that it's impossible to compile > Python, only that's there's a l

Re: merits of Lisp vs Python

2006-12-12 Thread Neil Cerutti
On 2006-12-13, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Try reading again. In Lisp, you use () and *your editor* > automatically indents according to the universal standard, or > you leave it sloppy until other folks reading your code > convince you to get a proper programming editor. Indenta

Re: merits of Lisp vs Python

2006-12-12 Thread [EMAIL PROTECTED]
Robert Uhl wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > I have the code here (probably not the latest bcs I left the company > > when it was acquired), let's do a little experiment, for what it's > > worth: 89727 lines of Lisp code in 131 modules (lisp code files), 3306 > > "(defun"

Re: how can i write a hello world in chinese with python

2006-12-12 Thread bearsprite
try unicode? "kernel1983 写道: " > I'm try to build a bundle on OS X, so I write a simple python script > for a test: > > #!/usr/bin/env python > import EasyDialogs > EasyDialogs.Message("Hello,Mac!") > > > This runs OK,but when I try to replace "Hello,Mac!" with chinese, it > can't be display right

Re: How to subclass sets.Set() to change intersection() behavior?

2006-12-12 Thread Gabriel Genellina
At Tuesday 12/12/2006 23:23, mkppk wrote: I have kind of strange change I'd like to make to the sets.Set() intersection() method.. Normally, intersection would return items in both s1 and s2 like with something like this: s1.intersection(s2) I want the item matching to be a bit "looser".. tha

Re: merits of Lisp vs Python

2006-12-12 Thread [EMAIL PROTECTED]
Bjoern Schliessmann wrote: > Robert Uhl wrote: > > > Because it's the language for which indentation is automatically > > determinable. That is, one can copy/paste a chunk of code, hit a > > key and suddenly everything is nicely indented. > > Cool, so in other languages I need to set block marks

Re: How to subclass sets.Set() to change intersection() behavior?

2006-12-12 Thread Raymond Hettinger
[mkppk] > I have kind of strange change I'd like to make to the sets.Set() > intersection() method.. > > Normally, intersection would return items in both s1 and s2 like with > something like this: s1.intersection(s2) . . . > - the lists I am working with are small, like 1-10 items each from set

Re: Inconsistency in dictionary behaviour: dict(dict) not calling __setitem__

2006-12-12 Thread Raymond Hettinger
[Almad] > I discovered this behaviour in dictionary which I find confusing. In > SneakyLang, I've tried to extend dictionary so it visits another class > after something is added: > > class RegisterMap(dict): > def __setitem__(self, k, v): > dict.__setitem__(self, k,v) > self[k]

Re: Tkinter button doesn't appear in OS X

2006-12-12 Thread crystalattice
I downloaded your file and got it working. Thanks for the hint and the code. I really appreciate it. -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-12 Thread Neil Cerutti
On 2006-12-13, hit_the_lights <[EMAIL PROTECTED]> wrote: > Neil Cerutti schrieb: > >> >> a[i] = b[n] >> >> >> >> with >> >> >> >> (setf (aref a i) (aref b n)) >> >> >> >> and the attractions of Python may make more sense. >> > >> > Here Python and Lisp are equal, 7 tokens vs 7 tokens, but in >>

how can i write a hello world in chinese with python

2006-12-12 Thread kernel1983
I'm try to build a bundle on OS X, so I write a simple python script for a test: #!/usr/bin/env python import EasyDialogs EasyDialogs.Message("Hello,Mac!") This runs OK,but when I try to replace "Hello,Mac!" with chinese, it can't be display rightly. Then I tried some way else: #!/usr/bin/env p

I find a good shop online!

2006-12-12 Thread a10990370
This is a network store, specializes in selling each kind of international well-known brand, for example: ADIDAS, NIKE, CD, DG, EVISU, ATINK and so on. My MSN is [EMAIL PROTECTED] www.loveinfashion.com -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-12 Thread Ken Tilton
Robert Uhl wrote: > "Stephen Eilert" <[EMAIL PROTECTED]> writes: > >>So, let's suppose I now want to learn LISP (I did try, on several >>occasions). What I would like to do would be to replace Python and >>code GUI applications. Yes, those boring business-like applications >>that have to access

Re: merits of Lisp vs Python

2006-12-12 Thread Ken Tilton
Markus Triska wrote: > Ken Tilton <[EMAIL PROTECTED]> writes: > > >>I think all-rules-all-the-time Prolog is the poster boy for paradigm >>slavery. (I did try for a famous two months to use Prolog as a >>general-purpose programming language.) > > > Don't expect to learn Prolog properly in so

Re: merits of Lisp vs Python

2006-12-12 Thread greg
George Sakkis wrote: > I'm sure there should be more convincing examples for macros, but > neither this nor the 'unless' syntax sugar cuts it. Also, the new 'with' statement and associated protocol covers much of the ground that was left out by the existing constructs. -- Greg -- http://mail.py

Re: merits of Lisp vs Python

2006-12-12 Thread greg
Robert Uhl wrote: > o Symbols > > In Lisp, a symbol is essentially a hashed string; Are you aware that strings can be interned in Python? Furthermore, any string literal in the source that is a syntactically valid identifier is automatically interned, and you can intern any string explicitly if

Re: merits of Lisp vs Python

2006-12-12 Thread greg
Jon Harrop wrote: > Outside Lisp, macros are for syntax. Evaluation semantics (e.g. lazy > evaluation) then have nothing to do with macros. I don't think that's entirely true. With currying and lazy evaluation, there's a sense in which Haskell function definitions already *are* macros. There are

Re: merits of Lisp vs Python

2006-12-12 Thread greg
Paul Rubin wrote: > I think the Lispies see "more dynamism" as a good thing and are > therefore defending their language from suggestions that Python is > even more dynamic than Lisp. I mean "dynamic" in a less good way-- Indeed, Python has sometimes been described as "pathologically dynamic". A

Re: merits of Lisp vs Python

2006-12-12 Thread greg
Espen Vestre wrote: > Paul Rubin writes: > > there is a huge amount of > > state scattered all through a running Python program, that the > > application can modify at random > > That's what I call /kludgy/, not /dynamic/ ;-) I think "kludgy" is a bit unfair, since th

Re: merits of Lisp vs Python

2006-12-12 Thread greg
Juan R. wrote: > I see no dinamism on your example, just static overloading. There's nothing static about it: q = raw_input() if q == "A": a = 1 b = 2 else: a = "x" b = "y" c = a + b There is no way that the compiler can statically determine what the + operator n

Re: merits of Lisp vs Python

2006-12-12 Thread Robert Uhl
"Stephen Eilert" <[EMAIL PROTECTED]> writes: > > So, let's suppose I now want to learn LISP (I did try, on several > occasions). What I would like to do would be to replace Python and > code GUI applications. Yes, those boring business-like applications > that have to access databases and consume t

Re: merits of Lisp vs Python

2006-12-12 Thread Markus Triska
Ken Tilton <[EMAIL PROTECTED]> writes: > I think all-rules-all-the-time Prolog is the poster boy for paradigm > slavery. (I did try for a famous two months to use Prolog as a > general-purpose programming language.) Don't expect to learn Prolog properly in so little time. To your previous questi

binary input and memory address passing

2006-12-12 Thread Eric Carlson
Hello, I can open, read, and convert data to a numeric (double) array from a binary file using nc = #something given nr = #something given f_o=open('junk.bin','rb') x=reshape(array('d',f_o.read()),(nr,nc)) Is there a way in python that gives better performance? These commands take three to 4 t

Re: How to turn of the monitor by python?

2006-12-12 Thread Leo Kislov
[EMAIL PROTECTED] wrote: > I want to turn off my monitor from within python, How to do it? > Thanks! Do you realize that hardware management and control is OS dependant? When asking such questions always specify OS. Assuming you are interested in Windows, then you just need to translate this

Re: merits of Lisp vs Python

2006-12-12 Thread Robert Uhl
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > I have the code here (probably not the latest bcs I left the company > when it was acquired), let's do a little experiment, for what it's > worth: 89727 lines of Lisp code in 131 modules (lisp code files), 3306 > "(defun" (by grep|wc), and 261 "(

Re: merits of Lisp vs Python

2006-12-12 Thread Robert Uhl
Steven D'Aprano <[EMAIL PROTECTED]> writes: >>> Yes. But you can't redefine 1+2 in Python, at least not without hacking the interpreter. Can you redefine (+ 1 2) in Lisp? >>> >>> Not without barreling through error messages about name conflicts. >> >> Ah, nice to get a straight answer

How to subclass sets.Set() to change intersection() behavior?

2006-12-12 Thread mkppk
I have kind of strange change I'd like to make to the sets.Set() intersection() method.. Normally, intersection would return items in both s1 and s2 like with something like this: s1.intersection(s2) I want the item matching to be a bit "looser".. that is, items in s2 that match to just the begi

Re: YouTube written in Python

2006-12-12 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Really? > It's awful! Awesome? > Terry Reedy wrote: >> In a thread on the PyDev list, Guido van Rossum today wrote: >> > And I just found out (after everyone else probably :-) that YouTube is >> > almost entirely written in Python. (

Re: merits of Lisp vs Python

2006-12-12 Thread Robert Uhl
Steven D'Aprano <[EMAIL PROTECTED]> writes: > > Even if you're stuck on some god-forsaken Windows PC with just > Notepad, you can still read Python code. Ummm...Lisp ain't APL--it's just ASCII (or ISO-8859-1 or Unicode or whatever...), and thus just as readable in Notepad as anything else. > Now,

Re: merits of Lisp vs Python

2006-12-12 Thread Paddy
John Thingstad wrote: > On Wed, 13 Dec 2006 01:54:58 +0100, Paddy <[EMAIL PROTECTED]> wrote: > > > > > Robert Uhl wrote: > > > >> Steven D'Aprano <[EMAIL PROTECTED]> writes: > >> > > >> > Speaking as somebody who programmed in FORTH for a while, that doesn't > >> > impress me much. Prefix/postfix

test

2006-12-12 Thread Jimmy E Touma
please ignore -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-12 Thread Robert Uhl
"mystilleef" <[EMAIL PROTECTED]> writes: > > Any sizable Lisp applications will make extensive use of macros. Emacs > and magic ( the web framework) come to mind. $ cat `find /usr/share/emacs/ -name '*.el' -print ` | grep defmacro | wc -l 1393 $ cat `find /usr/share/emacs/ -name '*.el' -print ` |

Re: merits of Lisp vs Python

2006-12-12 Thread Paddy
[EMAIL PROTECTED] wrote: > > > > Python has this unsung module called doctest that neatly shows some of > > > > the strengths of python: http://en.wikipedia.org/wiki/Doctest > > > > Now I'm *certain* that you're just pulling my leg: You guys document > > > all your random ten-line hacks in Wiki

Re: -W: Python bug? Documentation bug?

2006-12-12 Thread Clarence
Clarence wrote: > It appears that the -W option on starting python doesn't work the same > as the warnings module. In particular, the "message" parameter is not > treated as a regular expression, but rather a string literal which must > appear at the beginning of a warning message in order to matc

How to turn of the monitor by python?

2006-12-12 Thread could . net
I want to turn off my monitor from within python, How to do it? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: YouTube written in Python

2006-12-12 Thread Leif K-Brooks
Terry Reedy wrote: > In a thread on the PyDev list, Guido van Rossum today wrote: >> And I just found out (after everyone else probably :-) that YouTube is >> almost entirely written in Python. (And now I can rub shoulders with >> the developers since they're all Googlers now... :-) Interesting. I

Re: merits of Lisp vs Python

2006-12-12 Thread John Thingstad
On Wed, 13 Dec 2006 01:54:58 +0100, Paddy <[EMAIL PROTECTED]> wrote: > > Robert Uhl wrote: > >> Steven D'Aprano <[EMAIL PROTECTED]> writes: >> > >> > Speaking as somebody who programmed in FORTH for a while, that doesn't >> > impress me much. Prefix/postfix notation is, generally speaking, more >>

Re: Embedding a shell / editor in a wxPython application

2006-12-12 Thread André
hg wrote: > Hi, > > Are there modules out there (ex: scintilla for editor ...) ? > > Thanks > > hg Yes. An example that shows both a scintilla-based editor and a shell can be found under Lightning at https://sourceforge.net/project/showfiles.php?group_id=125834 André -- http://mail.python.org

Re: merits of Lisp vs Python

2006-12-12 Thread Paddy
Paul Rubin wrote: > "Paddy" <[EMAIL PROTECTED]> writes: > > Python can be used as a glue language. It is not solely a glue > > language. > > A lot of people find using Python to script libraries written in other > > languages > > a way to get things done. Ask the scipy guys or the biopython guys.

Re: merits of Lisp vs Python

2006-12-12 Thread Ken Tilton
Paul Rubin wrote: > Ken Tilton <[EMAIL PROTECTED]> writes: > >>Oh, my. time to trot out my "hey, X is cool, let's use it for >>everything!" rant. > > > Somehow it's something other than a rant if X is Lisp? Ah, your discriminator misfired. Keep your eye on the bouncing rant: I was not espous

Re: merits of Lisp vs Python

2006-12-12 Thread hit_the_lights
Neil Cerutti schrieb: > On 2006-12-12, André Thieme <[EMAIL PROTECTED]> wrote: > >> Contrast the much more common > >> > >> a[i] = b[n] > >> > >> with > >> > >> (setf (aref a i) (aref b n)) > >> > >> and the attractions of Python may make more sense. > > > > Here Python and Lisp are equal, 7

Re: YouTube written in Python

2006-12-12 Thread could . net
Really? It's awful! Terry Reedy wrote: > In a thread on the PyDev list, Guido van Rossum today wrote: > > And I just found out (after everyone else probably :-) that YouTube is > > almost entirely written in Python. (And now I can rub shoulders with > > the developers since they're all Googlers now

Re: merits of Lisp vs Python

2006-12-12 Thread Paddy
Jesús Carrete Montaña wrote: > > Fast. Very fast! > > > > - Paddy. > > > Well, Python certainly is faster than most people doing floating-point > arithmetic by hand, but I don't think this is the correct argument to use > against Lisp :-P. Why not! Lispers can indeed roll-their-own anything, many

Re: Inconsistency in dictionary behaviour: dict(dict) not calling__setitem__

2006-12-12 Thread Terry Reedy
"Almad" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > I discovered this behaviour in dictionary which I find confusing ... > However, when constructing dictionary with dictionary in constructor > like d = RegisterMap({'k':'v'}), __setitem__ is not called, d.__setitem__

-W: Python bug? Documentation bug?

2006-12-12 Thread Clarence
It appears that the -W option on starting python doesn't work the same as the warnings module. In particular, the "message" parameter is not treated as a regular expression, but rather a string literal which must appear at the beginning of a warning message in order to match. The treatment of -W in

YouTube written in Python

2006-12-12 Thread Terry Reedy
In a thread on the PyDev list, Guido van Rossum today wrote: > And I just found out (after everyone else probably :-) that YouTube is > almost entirely written in Python. (And now I can rub shoulders with > the developers since they're all Googlers now... :-) In reply, Simon Brunning noted: > That

Re: Is anyone using Python for embedded applications?

2006-12-12 Thread Paul Rubin
"Carl J. Van Arsdall" <[EMAIL PROTECTED]> writes: > Oh, and if anyone has opinions/facts on why > python should not be used in an embedded platform, I'd like to know > that too. I'm somewhat familiar with pythons needs on a system, but > there are a number of things I am not aware of. Thanks to ev

Re: merits of Lisp vs Python

2006-12-12 Thread Paul Rubin
Slawomir Nowaczyk <[EMAIL PROTECTED]> writes: > #> Lisp interpreters are several orders of magnitude faster than Python, > #> and Lisp compilers are faster yet. Speed's not the most important > #> thing, but it is _an_ important thing; all other things being equal, > #> the faster solution is bette

Re: merits of Lisp vs Python

2006-12-12 Thread Paddy
Robert Uhl wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > > > > Speaking as somebody who programmed in FORTH for a while, that doesn't > > impress me much. Prefix/postfix notation is, generally speaking, more > > of a pain in the rear end than it is worth, even if it saves you a > > tiny

Re: merits of Lisp vs Python

2006-12-12 Thread Paul Rubin
Ken Tilton <[EMAIL PROTECTED]> writes: > Oh, my. time to trot out my "hey, X is cool, let's use it for > everything!" rant. Somehow it's something other than a rant if X is Lisp? -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-12 Thread Paul Rubin
Robert Uhl <[EMAIL PROTECTED]> writes: > > And you can't implement Python generators as Lisp macros in any > > reasonable way. > I'm pretty certain it could be done with conditions. It's worse than that, there was a big sub-thread about it, conclusion seems to be it can be done but you need a code

Re: merits of Lisp vs Python

2006-12-12 Thread Paul Rubin
Pascal Costanza <[EMAIL PROTECTED]> writes: > It's funny: Language designers have been spending a lot of effort over > the decades on designing language constructs that help to improve the > opportunities to reuse of software libraries. Yet every five years, or > so, new languages and technologies

Re: One module per class, bad idea?

2006-12-12 Thread Paddy
Isaac Rodriguez wrote: > I will like to understand why this will not be a good idea for python, > other than to make beautiful import statements that is. > > Thanks, > > - Isaac. Read more Python source Isaac. especially for modules you like to use. That way you see how others use modules and can

Re: merits of Lisp vs Python

2006-12-12 Thread Paul Rubin
jayessay <[EMAIL PROTECTED]> writes: > You're mistaken, I'm not forgetting this. And despite this being > true, CL added several "new" things that (again through actual > experience) were deemed sufficiently understood to add (CLOS, > conditions, and such). I thought CL's condition system was sim

Re: One module per class, bad idea?

2006-12-12 Thread Carl Banks
Carl J. Van Arsdall wrote: > Carl Banks wrote: > > Carl J. Van Arsdall wrote: > >> A module per class makes a lot of sense in some cases, or rather, make > >> your module your class (look at the singleton pattern). I actually like > >> to structure all of my code like this, it helps me keep things

Re: Inconsistency in dictionary behaviour: dict(dict) not calling __setitem__

2006-12-12 Thread Andrea Griffini
Mitja Trampus wrote: ... > At least, I know it surprised me when I first met this behavior. Or is > my reasoning incorrect? Why len() doesn't call iteritems() ? :-) Kidding apart for example it would be ok for __setitem__ to call either an internal "insert_new_item" or "update_existing_item" de

Re: Is anyone using Python for embedded applications?

2006-12-12 Thread [EMAIL PROTECTED]
Carl J. Van Arsdall wrote: > I'm aware of a couple python projects for embedded systems. I am > currently considering using Python on an embedded platform to develop a > simple application as a personal project, mostly to see if it will > work. I was wondering if anyone here was using python for

Re: merits of Lisp vs Python

2006-12-12 Thread George Sakkis
Bill Atkins wrote: > greg <[EMAIL PROTECTED]> writes: > > > When moving a set of statements in Python, you > > are usually selecting a set of complete lines, > > cutting them out and then pasting them in > > between two other lines somewhere else. > > You're missing Ken's point, which is that in L

Re: How to upload a file

2006-12-12 Thread 3c273
"Lad" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Users needs to upload big files upto 100MB.So I think that FTP protocol > would be a solution, but how can I allow users to select the right file > ,on their local disk, via a file dialog ? > > Thank you for your ideas > L. > impo

Re: newb: SENDING os.system(encode_cmd) output to a logging file

2006-12-12 Thread Gabriel Genellina
At Monday 11/12/2006 23:49, johnny wrote: Gabriel Genellina wrote: > At Monday 11/12/2006 20:47, johnny wrote: > > >How do I pipe the output, generated from os.system(some_command), to > >the logging file? > > Use the subprocess module to run the command instead. I am doing the os.system(encode

Re: merits of Lisp vs Python

2006-12-12 Thread Slawomir Nowaczyk
On Tue, 12 Dec 2006 10:30:40 -0700 Robert Uhl <[EMAIL PROTECTED]> wrote: #> Imagine if one could write this in Python: #> #> defsyntax unless(condition, commands): #> if not condition: #> commands #> #> And use it like this: #> #> unless day == 'Sunday': #> work() #> #> That'

Re: Lookup caching

2006-12-12 Thread Andrea Griffini
MRAB wrote: ... > What are you using for the timestamp? Are you calling a function to > read a timer? For timestamp I used a static variable; to update the timestamp for a dictionary I used d->timestamp = ++global_dict_timestamp; I'm using a single counter for all dicts so that when doi

Re: One module per class, bad idea?

2006-12-12 Thread Carl J. Van Arsdall
Carl Banks wrote: > Carl J. Van Arsdall wrote: > >> Isaac Rodriguez wrote: >> Yes, it would be a bad idea. =) >>> Saying it is a bad idea and not explaining why will not help anyone. I >>> would like you to elaborate on why it is a bad idea to have one file >>> per c

Re: doubt in curses module

2006-12-12 Thread Gabriel Genellina
Please keep posting on the list. At Tuesday 12/12/2006 02:02, pradeep kumar wrote: i want to use function keys to continue or pause or quit in my program so i searched how to use function keys then i found curses module I think you may want this portable getch function:

And now for something completely different...

2006-12-12 Thread Caleb Hattingh
I spent way too much time reading the recent massive ">500-messages" thread, and then spent even more time (perhaps better spent) reading wider on some aspects of the debate. This recently-found link sets out (from one possibly-biased POV, I guess) how the rift between GNU Emacs and XEmacs occurre

Re: merits of Lisp vs Python

2006-12-12 Thread Kaz Kylheku
I V wrote: > To be a little provocative, I wonder if the idea that you're "talking to > the interpreter" doesn't apply more to lisp than to python; you can have > any syntax you like, as long as it looks like an AST. Actually, that is false. You can have any syntax you like in Common Lisp. For ins

Re: Problem understanding how closures work

2006-12-12 Thread Tom Plunket
Rob Williscroft wrote: > "name" in the above code is bound to a an entry in "CreateTests1"'s > locals, and ExCall has a (hidden) reference to that locals, so > by the time ExCall is finally called the value associated > with "name" has been replaced by (count - 1). Ah, I got it. Thanks. Than

Re: merits of Lisp vs Python

2006-12-12 Thread Slawomir Nowaczyk
On Sat, 09 Dec 2006 14:57:08 -0500 Bill Atkins <[EMAIL PROTECTED]> wrote: #> In Python, I would need to do something like: #> #> control_code = connection.read_next_control_code() #> if control_code == +break+: #> connection.kill() #> throw blah #> else if control_code == +status+:

Re: merits of Lisp vs Python

2006-12-12 Thread Slawomir Nowaczyk
On Tue, 12 Dec 2006 03:33:32 -0800 Paul Rubin <"http://phr.cx"@NOSPAM.invalid> wrote: #> I V <[EMAIL PROTECTED]> writes: #> > > Also, Python does not support a functional style of programming so the #> > > line is the only meaningful textual entity. In this sense the #> > > primitiveness of Pyth

Re: merits of Lisp vs Python

2006-12-12 Thread Slawomir Nowaczyk
On Tue, 12 Dec 2006 00:21:48 -0800 I V <[EMAIL PROTECTED]> wrote: #> On Mon, 11 Dec 2006 23:24:07 -0500, Ken Tilton wrote: #> > Also, Python does not support a functional style of programming so #> > the line is the only meaningful textual entity. In this sense the #> > primitiveness of Python mak

Re: merits of Lisp vs Python

2006-12-12 Thread Slawomir Nowaczyk
On Sat, 09 Dec 2006 10:08:01 + Jon Harrop <[EMAIL PROTECTED]> wrote: #> Steven D'Aprano wrote: #>> Anything any language can do is possible in any other language #> #> Not true. Concurrency, for example. As in, say, not being able to implement concurrency in assembler? -- Best wishes,

Re: One module per class, bad idea?

2006-12-12 Thread Carl Banks
Matias Jansson wrote: > I come from a background of Java and C# where it is common practise to have > one class per file in the file/project structure. As I have understood it, > it is more common practice to have many classes in a Python module/file. > What is the motivation behind it, would it be

Re: One module per class, bad idea?

2006-12-12 Thread Carl Banks
Carl J. Van Arsdall wrote: > Isaac Rodriguez wrote: > >> Yes, it would be a bad idea. =) > >> > > > > Saying it is a bad idea and not explaining why will not help anyone. I > > would like you to elaborate on why it is a bad idea to have one file > > per class. > > > A module per class makes a lot o

Re: merits of Lisp vs Python

2006-12-12 Thread André Thieme
Bruno Desthuilliers schrieb: > Mathias Panzenboeck a écrit : >> Mark Tarver wrote: >> >>> How do you compare Python to Lisp? What specific advantages do you >>> think that one has over the other? >>> >>> Note I'm not a Python person and I have no axes to grind here. This is >>> just a question fo

Re: need guidance on sending emails with attachment with python.

2006-12-12 Thread ina
I put to gether a class to deal with this along time ago it might be of help to you. You can find it at http://phlik.ishpeck.net/index.php?P=b1114201575phlik. krishnakant Mane wrote: > hello, > I am a bit confused. > I want to make a program that will take some data from a database and > make a st

Re: Inconsistency in dictionary behaviour: dict(dict) not calling __setitem__

2006-12-12 Thread Fredrik Lundh
Mitja Trampus wrote: > I think what was unexpected for the OP is that dict.__init__ > does not use __setitem__ to create its internal structures. you can implement most methods on core objects in terms of other methods. picking one by random, and then complaining that other methods don't use

Re: Snake references just as ok as Monty Python jokes/references in python community? :)

2006-12-12 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I'm semi-seriously wondering if snake jokes are valid in the Python > community since technically, Python came from Monty Python, not > slithery animals. > > Problem is I don't know that anyone born after Elvis died gets any of > these Monty Python jokes. > > Is it k

Re: Lookup caching

2006-12-12 Thread MRAB
Andrea Griffini wrote: > Gabriel Genellina wrote: > > At Saturday 9/12/2006 23:04, Andrea Griffini wrote: > > > >> I implemented that crazy idea and seems working... in its > >> current hacked state can still pass the test suite (exluding > > > > What crazy idea? And what is this supposed to do? >

Re: oo problem

2006-12-12 Thread Bruno Desthuilliers
Tool69 a écrit : > Hi, > I've got a simple but difficult problem : > > Suppose I've got a Paper class, on wich I can draw i.e a rectangle, a > circle or whatever. > > class Paper(...): > def __init__(self, paperx, papery): > self.paperx = paperx > self.papery = papery >

Re: py-ldap question

2006-12-12 Thread Michael Ströder
Laszlo Nagy wrote: > > l = ldap.initialize("ldaps://neptunus.msnet:636") > [..] > ldap.SERVER_DOWN: {'info': 'error:14090086:SSL > routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed', 'desc': > "Can't contact LDAP server"} > > I think that I need to specify to the openldap client to t

Re: Inconsistency in dictionary behaviour: dict(dict) not calling __setitem__

2006-12-12 Thread Mitja Trampus
Fredrik Lundh wrote: > Almad wrote: > >> However, when constructing dictionary with dictionary in constructor >> like d = RegisterMap({'k':'v'}), __setitem__ is not called > > why should it do that? dict() is a concrete implementation, not a > template class for the creation of dict-like object

  1   2   3   >