Re: merits of Lisp vs Python

2006-12-17 Thread Paul Rubin
[EMAIL PROTECTED] writes: > I should assume you meant Common Lisp, but there isn't really any > reason you couldn't > > (poke destination (peek source)) That breaks the reliability of GC. I'd say you're no longer writing in Lisp if you use something like that. Writing in this "augmented Li

Re: merits of Lisp vs Python

2006-12-17 Thread Paul Rubin
Bill Atkins <[EMAIL PROTECTED]> writes: > > GC also gets rid of programs. There are programs you can write in C > > but not in Lisp, like device drivers that poke specific machine > > addresses. > > I'm sure this would be news to the people who wrote the operating > system for the Lisp machine.

Re: merits of Lisp vs Python

2006-12-17 Thread Bill Atkins
Paul Rubin writes: > [EMAIL PROTECTED] writes: >> I should assume you meant Common Lisp, but there isn't really any >> reason you couldn't >> >> (poke destination (peek source)) > > That breaks the reliability of GC. I'd say you're no longer writing > in Lisp if y

Re: merits of Lisp vs Python

2006-12-17 Thread xscottg
Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > I should assume you meant Common Lisp, but there isn't really any > > reason you couldn't > > > > (poke destination (peek source)) > > That breaks the reliability of GC. I'd say you're no longer writing > in Lisp if you use something like tha

Re: merits of Lisp vs Python

2006-12-17 Thread Paul Rubin
Bill Atkins <[EMAIL PROTECTED]> writes: > Whatever do you mean? The portion of memory used for memory-mapped > registers is simply excluded from GC; everything else works as normal. Well ok, if the peek and poke functions validate the addresses. > All modern Lisps (yes, *Common* Lisps) support a

Re: merits of Lisp vs Python

2006-12-17 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Even regarding interupts, I don't see a problem without a solution: > (with-interupts-and-garbage-collection-disabled >(poke destination (peek source)) It's not just GC or interrupts, it's the possibility of clobbering the Lisp heap. If the peek/poke addres

Re: merits of Lisp vs Python

2006-12-17 Thread xscottg
Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > Even regarding interupts, I don't see a problem without a solution: > > (with-interupts-and-garbage-collection-disabled > >(poke destination (peek source)) > > It's not just GC or interrupts, it's the possibility of clobbering the > Lis

Re: merits of Lisp vs Python

2006-12-17 Thread Paul Rubin
[EMAIL PROTECTED] writes: > So don't (poke (random) value). That would be obvious to anyone > capable of writing a device driver in C or Lisp or Oberon or Similarly in C programs, don't do *random = 0; Avoiding that is easier said than done. C programs suffer endless bugs of that type.

Re: merits of Lisp vs Python

2006-12-17 Thread Jean-Paul Calderone
On 11 Dec 2006 03:01:32 -0800, Ravi Teja <[EMAIL PROTECTED]> wrote: >Timofei Shatrov wrote: > > [snip] > >Of course, doctest is hardly the ultimate testing solution. But it does >an admirable job for many cases where you don't need to setup elaborate >tests. > >> It's not surprising that no one use

Re: Good Looking UI for a stand alone application

2006-12-17 Thread [EMAIL PROTECTED]
You could write it as a web app, with an executable which launches the server and points a browser at it. Python GUI work is a bit of a drag, really. One of the worst things about it, IMHO. -T Vincent Delporte wrote: > On Mon, 18 Dec 2006 01:23:10 +0100, Christophe Cavalaria > <[EMAIL PROTECTED

Re: trees

2006-12-17 Thread [EMAIL PROTECTED]
You could use ElementTree for XML. Or just use nested dictionaries. -T John Nagle wrote: > Delaney, Timothy (Tim) wrote: > > vertigo wrote: > > > > > >>Hello > >> > >>What library/functions/classes could i use to create trees ? > > SpeedTree, of course. > > http://www.speedtree.com > >

dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
I have an MySQL database called zingers. The structure is: zid - integer, key, autoincrement keyword - varchar citation - text quotation - text the encoding and collation is utf-8 I am having trouble storing text, as typed in last two fields. Special characters and punctuation

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread Fredrik Lundh
ronrsr wrote: > I have an MySQL database called zingers. The structure is: > > zid - integer, key, autoincrement > keyword - varchar > citation - text > quotation - text > > the encoding and collation is utf-8 > > I am having trouble storing text, as typed in last two fields. S

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
structure for the DB: CREATE TABLE `zingers` ( `zid` int(9) unsigned NOT NULL auto_increment, `keywords` varchar(255) default NULL, `citation` text, `quotation` text, PRIMARY KEY (`zid`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8 AUTO_INCREMENT=422 ; code for stor

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
> > are you passing in the strings as Unicode strings, or as something else? > if you're using something else, what have you done to tell the > database what it is? > not at all sure what I'm passing it as. The database default encoding is utf-8 the database collation is utf-8 the page encod

[no subject]

2006-12-17 Thread Divya Prakash
Hello , I would like to parse java files and detect class name's, attributes name's type's and visibility (and or list of methods). Is there any module who can parse easily a java file using jython? Regards Divya -- http://mail.python.org/mailman/listinfo/python-li

Re: merits of Lisp vs Python

2006-12-17 Thread John Thingstad
On Mon, 18 Dec 2006 05:19:49 +0100, > wrote: > [EMAIL PROTECTED] writes: >> So don't (poke (random) value). That would be obvious to anyone >> capable of writing a device driver in C or Lisp or Oberon or > > Similarly in C programs, don't do > > *random = 0; > > Avoiding that is easier sai

Re: merits of Lisp vs Python

2006-12-17 Thread Ravi Teja
Jean-Paul Calderone wrote: > On 11 Dec 2006 03:01:32 -0800, Ravi Teja <[EMAIL PROTECTED]> wrote: > >Timofei Shatrov wrote: > > > > [snip] > > > >Of course, doctest is hardly the ultimate testing solution. But it does > >an admirable job for many cases where you don't need to setup elaborate > >tes

Re: [IronPython] [ANN] IronPython Community Edition r5

2006-12-17 Thread M. David Peterson
SWEET! Caught this release before the news was no longer news, http://www.oreillynet.com/windows/blog/2006/12/seo_sanghyeonipce_ironpython_c_1.html Thanks, Seo! :) On 12/15/06, Sanghyeon Seo <[EMAIL PROTECTED]> wrote: This is the fifth release of IronPython Community Edition (IPCE). You can

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread John Nagle
ronrsr wrote: >>are you passing in the strings as Unicode strings, or as something else? >> if you're using something else, what have you done to tell the >>database what it is? >> > > > > not at all sure what I'm passing it as. > > The database default encoding is utf-8 > the database collat

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
version of python is 2.2 - -- http://mail.python.org/mailman/listinfo/python-list

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
version of python is either 2.2 or 2.4 bests, -rsr- John Nagle wrote: > ronrsr wrote: -- http://mail.python.org/mailman/listinfo/python-list

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread fumanchu
ronrsr wrote: > code for storing to database: > > querystring = "update zingers set keywords = '%s', citation = > '%s', quotation = %s' where zid = %d" % > (keywords,citation,quotation,zid) You're missing a single quote in there around the quotation %s. Are you also replacing "\\" w

Re: merits of Lisp vs Python

2006-12-17 Thread xscottg
Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > So don't (poke (random) value). That would be obvious to anyone > > capable of writing a device driver in C or Lisp or Oberon or > > Similarly in C programs, don't do > > *random = 0; > > Avoiding that is easier said than done. C programs s

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
> > > Try putting "use_unicode=True" in the MySQLdb "connect" call. tried that, and also added charset="utf8" - now, I can't do any string operations, I get the error msg: descriptor 'lower' requires a 'str' object but received a 'unicode' args = ("descriptor 'lower' requires a 'str'

<    1   2