Re: merits of Lisp vs Python

2006-12-12 Thread Robert Uhl
Paul Rubin writes: >> >> Sorry, I missed something here. Why do you need a release to have these >> sorts of things? Can't you just expand the language via macros to >> create whatever facility of this sort you need... > > Huh? Are you saying Lisp systems never release

how to bind a command to the open button

2006-12-12 Thread susan
Hi, Anybody knows how to bind a command to the open button at a file browser dialog? I want to add selected files to a scrolllist. Like this: def browseFile(self): file = askopenfilename(filetypes = [("TDF Files", "*.TDF"), ("All Files", "*.*")],multiple=1) ?. Than

Re: merits of Lisp vs Python

2006-12-12 Thread Robert Uhl
Steven D'Aprano <[EMAIL PROTECTED]> writes: > > It is a good thing that when Fred decides to stop contributing to an > open source project (or leave the company), other people can read his code > without having to learn his Uber-Special Custom Macro Extended > Language. And yet they have to learn

Re: how to bind a command to the open button

2006-12-12 Thread hg
susan wrote: > Hi, > Anybody knows how to bind a command to the open button at a file > browser dialog? I want to add selected files to a scrolllist. > > Like this: > > def browseFile(self): > > file = askopenfilename(filetypes = [("TDF Files", "*.TDF"), > ("All Files", "*.*")],multipl

Re: python vs java & eclipse

2006-12-12 Thread Bruno Desthuilliers
Amir Michail a écrit : > Hi, > > It seems to me that measuring productivity in a programming language > must take into account available tools and libraries. > > Eclipse for example provides such an amazing IDE for java that it is no > longer obvious to me that one would be much more productive i

Re: merits of Lisp vs Python

2006-12-12 Thread Robert Uhl
[EMAIL PROTECTED] (Aahz) writes: > > Consider this: Lisp has had years of development, it has had millions of > dollars thrown at it by VC firms -- and yet Python is winning over Lisp > programmers. Think about it. The argument from popularity is invalid. French units have overtaken standard uni

Re: object data member dumper?

2006-12-12 Thread tom arnall
George Sakkis wrote: > tom arnall wrote: >> >object data member dumper? >> >George Sakkis george.sakkis at gmail.com >> >Wed Nov 8 03:42:47 CET 2006 >> >> > tom arnall wrote: >> > >> > > Bruno Desthuilliers wrote: >> > > >> > > > tom arnall a écrit : >> > > >> does anyone know of a utility to do a

Re: How can I get involved

2006-12-12 Thread Prateek
Hey everyone... Thanks a million for the warm welcome. Not sure WHY I haven't posted before (although I have been lurking for a few weeks). I guess I've been learning via practice and other random documentation online. In case anyone is interested, the url of my organization is http://www.brainwa

Re: merits of Lisp vs Python

2006-12-12 Thread George Sakkis
Robert Uhl wrote: > o Macros > > As mentioned above, macros can make one's life significantly nicer. I > use Python a lot (it's currently a better choice than Lisp for many of > the problems I face), and I find myself missing macros all the time. > The ability to take some frequently-used idiom a

Re: merits of Lisp vs Python

2006-12-12 Thread Robert Uhl
"Ravi Teja" <[EMAIL PROTECTED]> writes: > Mark Tarver wrote: >> >> seems to show that Python is a cut down (no macros) version of Lisp >> with a worse performance. > > By that standard, every other mainstream dynamically typed language > for you is a cut-down version of Lisp with worse performance

Re: os.popen3 hangs in Windows XP SP1, SP2. Python 2.5 & 2.4. Consistent test case.

2006-12-12 Thread Pierre Rouleau
On Dec 12, 10:11 am, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Pierre Rouleau wrote: > > Hi all, > > > I have a consistent test case where os.popen3() hangs in Windows. The > > system hangs when retrieving the lines from the child process stdout. > > I know there were several reports related

Is anyone using Python for embedded applications?

2006-12-12 Thread Carl J. Van Arsdall
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 anything of that nature? For t

Re: Sybase module 0.38pre1 released

2006-12-12 Thread vasudevram
Sébastien Sablé wrote: > WHAT IS IT: > > The Sybase module provides a Python interface to the Sybase relational > database system. It supports all of the Python Database API, version > 2.0 with extensions. > > MAJOR CHANGES SINCE 0.37: > > * This release works with python 2.5 > > * It also works

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

2006-12-12 Thread Almad
Hello, 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].visit_register

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

2006-12-12 Thread Fredrik Lundh
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 objects. > Or should this be consider

Re: Sorting Multidimesional array(newbie)

2006-12-12 Thread Travis E. Oliphant
Tartifola wrote: > Hi, > how can I sort an array like > > array([[5, 2], >[1, 3]]) > > along the first column to obtain > > array([[1, 3], >[5, 2]]) > i.e. keeping track of the ordered couples? > > Thanks, > A Just to add one more solution to this question that works with numpy

Large files uploading

2006-12-12 Thread Lad
If a user will upload large files via FTP protocol, must the user have an FTP client on his computer or is it possible to use a similar way to "http form" comunication? Or is there another way( besides FTP) how to upload large files to server? Thank you he help Lad. -- http://mail.python.org/

Forking in windows. Possible?

2006-12-12 Thread [EMAIL PROTECTED]
I know under mac/*nix it's possible to fork the proccess to the background and exit the parent process. I have used this on a couple of my projects, but right now I am working on a project that will be required to run in the background, I have considered using the .pyw extension on my files, but th

Re: Large files uploading

2006-12-12 Thread Fredrik Lundh
Lad wrote: > If a user will upload large files via FTP protocol, must the user > have an FTP client on his computer or is it possible to use a similar > way to "http form" comunication? to use any communications protocol (including HTTP), both ends must have programs that can talk that protoc

Re: merits of Lisp vs Python

2006-12-12 Thread Robert Uhl
Neil Cerutti <[EMAIL PROTECTED]> writes: > >> http://www.gigamonkeys.com/book > > I got stuck (last year) in that book: > > http://www.gigamonkeys.com/book/practical-a-portable-pathname-library.html > > The author didn't do Common Lisp (or me) any favors by drawing my > attention to the pathname

ANN: wxPython 2.8.0.1

2006-12-12 Thread Robin Dunn
Announcing -- The 2.8.0.1 release of wxPython is now available for download at http://wxpython.org/download.php. This is the first of the new stable 2.8.x release series and is the culmination of the massive enhancement and stabalization effort done in the 2.7.x series. Source code is a

Re: One module per class, bad idea?

2006-12-12 Thread Isaac Rodriguez
> 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. Thanks, - Isaac. -- http://mail.python.org/mailman/listinfo/python-list

Re: One module per class, bad idea?

2006-12-12 Thread Carl J. Van Arsdall
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 of sense in some cases, or rather, mak

Re: One module per class, bad idea?

2006-12-12 Thread Isaac Rodriguez
> make the import statements look good. You can still make your import statements look good and have one class per file, that's one of the __init__.py wonderful features. Also, C++ support stand alone functions and the rule is to organize classes and their interface (functions that operate

Re: Emulate @classmethod using decorator and descriptor

2006-12-12 Thread Gabriel Genellina
On 12 dic, 08:46, "WaterWalk" <[EMAIL PROTECTED]> wrote: > Hello, I was recently learning python decorator and descriptor and > emulated a @classmethod decorator: > class EmuClassMethod(object): > def __init__(self, f=None): > self.f = f > def __get__(self, obj, klass=None): >

Re: How can I get involved

2006-12-12 Thread Gabriel Genellina
On 12 dic, 15:10, "Prateek" <[EMAIL PROTECTED]> wrote: > So I've started work on an Unpickler in Java. I'll post again soon with > the URL (haven't uploaded it yet). If anyone is interested, email me. Have you seen Jython? (formerly JPython) www.jython.org -- Gabriel Genellina -- http://mail.

Re: How can I get involved

2006-12-12 Thread Fredrik Lundh
Paul Boddie wrote: > I find it interesting that you've been using Python for so long and yet > haven't posted to this group before. c.l.python is just a small speck at the outer parts of the python universe. most python programmers don't even read this newsgroup, except, perhaps, when they stu

Re: merits of Lisp vs Python

2006-12-12 Thread Ken Tilton
Paul Rubin wrote: > Ken Tilton <[EMAIL PROTECTED]> writes: > The loop language is so complicated and confusing that I never bothered trying to learn it. >> >>That was my stance for about seven years of intense Lisp. Then the >>author of Practical Common Lisp did a nice job of breaking th

Re: wxPython, dynamically modify window

2006-12-12 Thread cmcp
Grant wrote: > Hi, I am looking for a tip. I have a panel and a checkbox. When I > check the checkbox, I would like to add buttons to the panel > (dynamically). When the checkbox is unchecked, the buttons should not > appear (be deleted)---all the while, the window should resize if necessary. >

Re: py-ldap question

2006-12-12 Thread jean-marc pouchoulon
and this set option ? ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT,ldap.OPT_X_TLS_NEVER) HTH Laszlo Nagy a écrit : > By the way, I already tried the set_option function, but I still get the > same error. > > > import ldap > import local > > ldap.set_option(ldap.OPT_X_TLS_ALLOW,1) > ldap.set_op

Re: Tkinter button doesn't appear in OS X

2006-12-12 Thread crystalattice
Kevin Walzer wrote: > When you run your program on OS X, there should be a menu item next to > the Apple menu that says "about Tcl/Tk," which you access from the > "Python" menu item. That will give you the version number. > > Python 2.3.5 and Tcl/Tk 8.4.7 ship with OS X 10.4. Python 2.4.2 is a >

Re: oo problem

2006-12-12 Thread Tool69
Dennis Lee Bieber a écrit : > > Perhaps you missed that the loop (in Paper) that invokes each > primitive's draw() is passing itself (the Paper instance)... > Oops, sorry I missed it in fact. But I still have a problem with my the primitives (some pathes I had to build ): i.e a mathematic

Re: newb: Creating Exception

2006-12-12 Thread johnny
Thank you Dennis, So when line 2, gets executed, its exception goes to do_some1_error. And when line 3, gets executed, its exception goes to do_some2_error and so on. line 1: try line 2:do_some1 line 3:do_some2 line 4:do_some3 line 5: except do_some1_error: line 6:whatever

Re: List of Events in wxPython

2006-12-12 Thread Jacksondf
John wrote the following on 12/07/2006 09:39 AM: > Exactly which docs are you looking at? The wxPython docs have a link > that lists all the classes, just scroll down to that particular class > and it lists the events, like hg posted. Strange. I was looking at: http://www.wxpython.org/docs/api/

Re: Why does wx.Window.CaptureMouse() send EVT_PAINT

2006-12-12 Thread Bill Jackson
Tim Roberts wrote the following on 12/09/2006 08:27 PM: > The source code could answer that question for sure, but I doubt that it is > CaptureMouse doing it, and I know the SetCapture API (which it eventually > calls) does not. Is it possible that your clicking caused some part of the > app to be

Problem understanding how closures work

2006-12-12 Thread Tom Plunket
...at least, I think that I'm having a problem understanding the way closures work. I'm trying to define a function for an object which will take certain objects from the parent scope at the time that function is defined. For some reason, if I do this function definition in a loop, the locals give

Re: merits of Lisp vs Python

2006-12-12 Thread Bjoern Schliessmann
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 like () and {} and also indent the code

moinmoin advocacy?

2006-12-12 Thread Marcus
Apologies if this seems like it's off-topic, but since moinmoin is written in Python, I am hoping to solicit some good thoughts in this group. The problem: I'm setting up a wiki farm (small software company, my personal use as a PIM, hobby site). I may also deploy (customized) wikis to small/medi

Frame hacking

2006-12-12 Thread George Sakkis
I wonder if the following is possible: def inject_n_call(func, **kwds): '''Call func by first updating its locals with kwds.''' def f(): return x*y >>> inject_n_call(f, x=3, y=4) 12 I've been playing with sys.settrace, updating frame.f_locals in the trace function, but it doesn't seem t

Re: One module per class, bad idea?

2006-12-12 Thread Gabriel Genellina
On 12 dic, 16:17, "Isaac Rodriguez" <[EMAIL PROTECTED]> 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. The HyperText package (http://dustman.ne

Re: merits of Lisp vs Python

2006-12-12 Thread Bruno Desthuilliers
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 for my general education. >> >>Mark >> > >

Re: Frame hacking

2006-12-12 Thread Gabriel Genellina
On 12 dic, 17:46, "George Sakkis" <[EMAIL PROTECTED]> wrote: > I wonder if the following is possible: > > def inject_n_call(func, **kwds): > '''Call func by first updating its locals with kwds.''' > > def f(): > return x*y > >>> eval(f.func_code, dict(x=3,y=4)) 12 -- http://mail.python

Re: merits of Lisp vs Python

2006-12-12 Thread Bruno Desthuilliers
Mathias Panzenboeck a écrit : > Rob Thorpe wrote: > >>Mathias Panzenboeck wrote: >> >>>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

Re: merits of Lisp vs Python

2006-12-12 Thread Neil Cerutti
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 tokens vs 7 tokens, but in > Python one has

Re: merits of Lisp vs Python

2006-12-12 Thread Pascal Costanza
Paul Rubin wrote: > jayessay <[EMAIL PROTECTED]> writes: >>> It's simply that newer language designs by definition have more of an >>> experience base to build on than older ones, if the designers care to >>> make use of it. >> Agreed. Indeed, that was the underlying guiding principle in putting >

Re: Can't register to CheeseShop at command line...only on web?!..

2006-12-12 Thread Richard Jones
[EMAIL PROTECTED] wrote: >> > Here is what happens when I try to register at command line with >> > .pypirc above... >> > >> > Using PyPI login from /home/seb/.pypirc >> > Server response (401): Authorization Required >> >> Do you use a proxy to access the web? > > Not that I'm aware of unless my

Re: Is anyone using Python for embedded applications?

2006-12-12 Thread Łukasz Langa
Check this out: http://www.telit.co.it/product.asp?productId=105 It works. Regards, Łukasz Langa -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem understanding how closures work

2006-12-12 Thread Rob Williscroft
Tom Plunket wrote in news:[EMAIL PROTECTED] in comp.lang.python: > ...at least, I think that I'm having a problem understanding the way > closures work. > > I'm trying to define a function for an object which will take certain > objects from the parent scope at the time that function is defined.

Re: Problem understanding how closures work

2006-12-12 Thread Gabriel Genellina
On 12 dic, 17:23, Tom Plunket <[EMAIL PROTECTED]> wrote: > ...at least, I think that I'm having a problem understanding the way > closures work. > > I'm trying to define a function for an object which will take certain > objects from the parent scope at the time that function is defined. > def Cr

Re: About alternatives to Matlab

2006-12-12 Thread konrad . hinsen
On 11.12.2006, at 14:21, Jon Harrop wrote: >> It's not a matter of number, it's a matter of availability when new >> processors appear on the market. How much time passes on average >> between the availability of a new processor type and the availability >> of a native code compiler for OCaml? > >

Re: Frame hacking

2006-12-12 Thread George Sakkis
Gabriel Genellina wrote: > On 12 dic, 17:46, "George Sakkis" <[EMAIL PROTECTED]> wrote: > > > I wonder if the following is possible: > > > > def inject_n_call(func, **kwds): > > '''Call func by first updating its locals with kwds.''' > > > > def f(): > > return x*y > > > > >>> eval(f.func_c

Re: Forking in windows. Possible?

2006-12-12 Thread Gabriel Genellina
[EMAIL PROTECTED] ha escrito: > I know under mac/*nix it's possible to fork the proccess to the > background and exit the parent process. I have used this on a couple of > my projects, but right now I am working on a project that will be > required to run in the background, I have considered using

Re: Validate XML against a set of XSD files, with Python

2006-12-12 Thread Sébastien Boisgérault
Laszlo Nagy wrote: > Do you know an open source lib that can do $subject? Fast google query, uncheked, leads to: - XSV: http://www.ltg.ed.ac.uk/~ht/xsv-status.html - libxml : http://codespeak.net/lxml/ Cheers, SB -- http://mail.python.org/mailman/listinfo/python-list

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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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 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 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: 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 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

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: 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:

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: 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: 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: 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: 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: 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: 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: 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: 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: 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 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
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: 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
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 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
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: 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

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

-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

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__

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: 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 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: 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 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: 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 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: 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

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

<    1   2   3   >