Organizing Python Representation at OSCON 2007

2007-06-27 Thread Jeff Rush
OSCON 2007 in Portland, Oregon from July 23-27 is fast approaching. This is a professional conference that can give Python a lot of visibility in the IT world and draws a different crowd from our community-run conferences like PyCon. There looks to be a good set of talks on the Python track,

Early Bird rate for PyCon UK closes this weekend

2007-06-27 Thread PyConUK Publicist
The first ever PyCon UK takes place in Birmingham on 8th 9th September 2007. Book before the end of Saturday (30th June) at http://www.pyconuk.org/booking.html to get the £60 early bird rate. This includes both days of the conference, the conference dinner and a T-shirt. For more information

[ANN] PyDAO - Python Hibernate-like Object-Relational Mapper

2007-06-27 Thread cieslak . dariusz
PyDAO is very thin object-relational mapper similar to Hibernate (but much simpler). It's created to speed-up application development. It's very simple, but powerful, based on POPO (Plain Old Python Objects). http://aplikacja.info/PyDAO.html Main features: - can use any database that has

Re: Python's only one way to do it philosophy isn't good?

2007-06-27 Thread Douglas Alan
Paul Rubin http://[EMAIL PROTECTED] writes: Douglas Alan [EMAIL PROTECTED] writes: In the Maclisp era functions like mapcar worked on lists, and generated equally long lists in memory. I'm aware, but there were various different mapping functions. map, as opposed to mapcar didn't return

ElementTree -- adding one structure to another?

2007-06-27 Thread Jan Danielsson
If have an element tree representing an XML document, and I load another tree from a file, is there an easy way to stick the second tree into the first one? fooElement = ET.SubElement(...) tree = ET.parse(TEMPLDIR + '/welcome.xml') elem = tree.getroot() Now I want to stick elem

Re: ElementTree -- adding one structure to another?

2007-06-27 Thread Jan Danielsson
Jan Danielsson wrote: If have an element tree representing an XML document, and I load another tree from a file, is there an easy way to stick the second tree into the first one? fooElement = ET.SubElement(...) tree = ET.parse(TEMPLDIR + '/welcome.xml') elem = tree.getroot()

Set builtin lookups

2007-06-27 Thread Evan Klitzke
I have a question about the internal representation of sets in Python. If I write some code like if x in some_list: do_something() the lookup for the in statement is O(n), where n is the number of elements in the list. Is this also true if I am using a set or are sets represented by a hash

Re: Set builtin lookups

2007-06-27 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Evan Klitzke wrote: I have a question about the internal representation of sets in Python. If I write some code like if x in some_list: do_something() the lookup for the in statement is O(n), where n is the number of elements in the list. Is this also true if I

Re: bicycle repair man help

2007-06-27 Thread Rob Weir
On 6/24/07, Rustom Mody [EMAIL PROTECTED] wrote: Does someone know that when using bicycle repair man to refactor python code what exactly extract local variable means? It means extracting a part (or all of) an expression and replacing it with a sensibly-named local variable. Shamelessly

String formatting for complex writing systems

2007-06-27 Thread Andy
Hi guys, I'm writing a piece of software for some Thai friend. At the end it is supposed to print on paper some report with tables of text and numbers. When I test it in English, the columns are aligned nicely, but when he tests it with Thai data, the columns are all crooked. The problem here

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread Timofei Shatrov
On Wed, 27 Jun 2007 00:07:04 -, Twisted [EMAIL PROTECTED] tried to confuse everyone with this message: Stubbornly insisting on being odd appears to be a particularly prevalent character flaw among the geeknoscenti. Oh the irony. -- |Don't believe this - you're not worthless

XML from SQL result

2007-06-27 Thread Marcin Stępnicki
Hello. I've skimmed through many PythonXML related books/articles but I am unable to find anything that is similar to my problem - but it seems to me that it should be common. Anyway: I've got the SQL query which returns: col1 | col2 | col3 -+--+- a | a10 | b20 a | a10 | b30

Re: String formatting for complex writing systems

2007-06-27 Thread Gabriel Genellina
En Wed, 27 Jun 2007 04:20:52 -0300, Andy [EMAIL PROTECTED] escribió: I'm writing a piece of software for some Thai friend. At the end it is supposed to print on paper some report with tables of text and numbers. When I test it in English, the columns are aligned nicely, but when he tests it

Re: XML from SQL result

2007-06-27 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Marcin Stępnicki wrote: Anyway: I've got the SQL query which returns: col1 | col2 | col3 -+--+- a | a10 | b20 a | a10 | b30 a | a20 | b30 I need to generate the following: tag1 col1=a tag2 col2=a10 tag3 col3=b20 /

Re: XML from SQL result

2007-06-27 Thread Stefan Behnel
Marcin Stępnicki wrote: I've skimmed through many PythonXML related books/articles but I am unable to find anything that is similar to my problem - but it seems to me that it should be common. Anyway: I've got the SQL query which returns: col1 | col2 | col3 -+--+- a | a10

Re: Python's only one way to do it philosophy isn't good?

2007-06-27 Thread Douglas Woodrow
On Wed, 27 Jun 2007 01:45:44, Douglas Alan [EMAIL PROTECTED] wrote A chaque son gout I apologise for this irrelevant interruption to the conversation, but this isn't the first time you've written that. The word chaque is not a pronoun.

Re: Python's only one way to do it philosophy isn't good?

2007-06-27 Thread Paul Rubin
Dennis Lee Bieber [EMAIL PROTECTED] writes: What happens when two individuals release libraries using these proposed macros -- and have implement conflicting macros using the same identifiers -- and you try to use both libraries in one application? Something like the current situation

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread Gian Uberto Lauri
Long count = 12.19.14.7.16; tzolkin = 2 Cib; haab = 4 Tzec. I get words from the Allmighty Great Gnus that T == Twisted [EMAIL PROTECTED] writes: T On Jun 26, 6:06 am, Gian Uberto Lauri [EMAIL PROTECTED] T wrote: HOW IN THE BLOODY HELL IS IT SUPPOSED TO OCCUR TO SOMEONE TO ENTER THEM,

Re: Python's only one way to do it philosophy isn't good?

2007-06-27 Thread Paul Rubin
Douglas Alan [EMAIL PROTECTED] writes: The thing is there was no standard way in Maclisp to write something like Python's count function and map over it. This could be done in Scheme with streams, of course. I'm not sure that you can blame MacLisp for not being object-oriented. The idea

Organizing Python Representation at OSCON 2007

2007-06-27 Thread Jeff Rush
OSCON 2007 in Portland, Oregon from July 23-27 is fast approaching. This is a professional conference that can give Python a lot of visibility in the IT world and draws a different crowd from our community-run conferences like PyCon. There looks to be a good set of talks on the Python track,

Re: XML from SQL result

2007-06-27 Thread Gabriel Genellina
En Wed, 27 Jun 2007 04:25:16 -0300, Marcin Stępnicki [EMAIL PROTECTED] escribió: I've skimmed through many PythonXML related books/articles but I am unable to find anything that is similar to my problem - but it seems to me that it should be common. Anyway: I've got the SQL query which

Re: PyKQueue

2007-06-27 Thread Jean-Paul Calderone
On Tue, 26 Jun 2007 21:48:46 -0700, Adam Atlas [EMAIL PROTECTED] wrote: Does anyone have a copy of PyKQueue 2.0 around? The site it's supposed to be on (http://python-hpio.net/trac/wiki/PyKQueue) is down. -- http://mail.python.org/mailman/listinfo/python-list

Searching for Python Talent !!

2007-06-27 Thread IT Recruiter
Hello friends! I am looking for a GUI focused Python developer to help in Website development with some wxpython experience... It's very useful to have other programming languages and paradigms About Client: Software house, fastest growing in the commercial market This is a permanent role in

Re: String formatting for complex writing systems

2007-06-27 Thread Leo Kislov
On Jun 27, 12:20 am, Andy [EMAIL PROTECTED] wrote: Hi guys, I'm writing a piece of software for some Thai friend.  At the end it is supposed to print on paper some report with tables of text and numbers.  When I test it in English, the columns are aligned nicely, but when he tests it with

Re: String formatting for complex writing systems

2007-06-27 Thread Leo Kislov
On Jun 27, 3:10 am, Leo Kislov [EMAIL PROTECTED] wrote: On Jun 27, 12:20 am, Andy [EMAIL PROTECTED] wrote: Hi guys, I'm writing a piece of software for some Thai friend.  At the end it is supposed to print on paper some report with tables of text and numbers.  When I test it in English,

import data.py using massive amounts of memory

2007-06-27 Thread Nick Craig-Wood
I've been dumping a database in a python code format (for use with Python on S60 mobile phone actually) and I've noticed that it uses absolutely tons of memory as compared to how much the data structure actually needs once it is loaded in memory. The programs below create a file (z.py) with a

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread Bjorn Borud
[Kjetil S. Matheussen [EMAIL PROTECTED]] | | Did you expect something specific before starting to read that book? | Thats a failure. SICP is a book you should read just for pure | pleasure. I was told by a lot of people I consider to be intelligent that this book would change how I think about

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread Bjorn Borud
[Twisted [EMAIL PROTECTED]] | | Some people might say the same thing about emacs. A lot of unix tools | even. Stubbornly insisting on being odd appears to be a particularly | prevalent character flaw among the geeknoscenti. I think you are missing the point. you may find Emacs (and UNIX) to be

Re: textmate and execute line

2007-06-27 Thread andrea
On 19 Giu, 14:20, andrea [EMAIL PROTECTED] wrote: Hi, I have the latest bundle for python (upgraded from svn) but I don't understand how execute line works.. It only works if I play with arithmetic operations, something like this works: 2*2 4 but for example trying to execute this line

Rappresenting infinite

2007-06-27 Thread andrea
I would like to have a useful rappresentation of infinite, is there already something?? I was thinking to something like this class Inf(int): numero infinito def __init__(self,negative=False): self.negative = negative def __cmp__(self,y):

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread Kjetil S. Matheussen
On Wed, 27 Jun 2007, Bjorn Borud wrote: | these people seemed to be | completely disconnected from reality. | | Please don't write things like that without backing it up with some | reason. well, for one, Scheme lacked proper libraries for doing everyday things, so when I tried to

Too many 'self' in python.That's a big flaw in this language.

2007-06-27 Thread [EMAIL PROTECTED]
HI I'm currently using Python. I find that a instance variable must confined with self, for example: class a: def __init__(self): self.aa=10 def bb(self): print self.aa # See .if in c++,I could use aa to change that variable That's a big inconvenience in coding

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread Twisted
On Jun 27, 4:18 am, Gian Uberto Lauri [EMAIL PROTECTED] wrote: [A very long, rambling, semi-coherent post] Strange. I am *NOT* a native english speaker and I think my Q.I. tends toward average from below... That much is obvious. ...but refcard sound very useful to me, maybe is short for

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-27 Thread Bruno Desthuilliers
paul a écrit : Bruno Desthuilliers schrieb: Stephen R Laniel a écrit : On Wed, Jun 20, 2007 at 09:41:09PM +0100, Michael Hoffman wrote: If you asked Java programmers why you couldn't turn *off* Java's static type checking if you wanted to, you'd probably get a similar response. Perhaps it

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-27 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: I'm currently using Python. I find that a instance variable must confined with self, for example: class a: def __init__(self): self.aa=10 def bb(self): print self.aa # See .if in c++,I could use aa to change that

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-27 Thread Bruno Desthuilliers
harri a écrit : Bruno Desthuilliers wrote: [...] It seems obvious from this that static typecheking would require dropping all dynamism from Python - then turning it into another, very different (and mostly useless as far as I'm concerned) language. IOW : you can't have Python *and* static

Re: Rappresenting infinite

2007-06-27 Thread Rob De Almeida
On Jun 27, 6:41 am, andrea [EMAIL PROTECTED] wrote: I would like to have a useful rappresentation of infinite, is there already something?? from numpy import inf -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-27 Thread Stephen R Laniel
On Wed, Jun 27, 2007 at 01:44:17PM +0200, Bruno Desthuilliers wrote: Indeed - static typing is for compilers, not for programmers. When done well, static typing helps the programmer -- just like writing good unit tests. It's not a magic bullet, but it can help. I'd like to point again to

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-27 Thread Neil Cerutti
On 2007-06-27, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: HI I'm currently using Python. I find that a instance variable must confined with self, for example: class a: def __init__(self): self.aa=10 def bb(self): print self.aa # See .if in c++,I could use aa to

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-27 Thread faulkner
On Jun 27, 7:02 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: HI I'm currently using Python. I find that a instance variable must confined with self, for example: class a: def __init__(self): self.aa=10 def bb(self): print self.aa # See .if in c++,I could use

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread Gian Uberto Lauri
Long count = 12.19.14.7.16; tzolkin = 2 Cib; haab = 4 Tzec. I get words from the Allmighty Great Gnus that T == Twisted [EMAIL PROTECTED] writes: T On Jun 27, 4:18 am, Gian Uberto Lauri [EMAIL PROTECTED] T wrote: T [A very long, rambling, semi-coherent post] Strange. I am *NOT* a native

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread Timofei Shatrov
On Wed, 27 Jun 2007 11:04:39 -, Twisted [EMAIL PROTECTED] tried to confuse everyone with this message: With a PS file you can do just one thing, execute it. It's a program, did you know ? For which you need an interpreter. Such as Ghostscript. Which is a pain to install and a bigger one

Re: popen and a long running process in a wx.python application

2007-06-27 Thread Doru Moisa
Mike, Ratko, Thanks a lot guys, for the quick and prompt answers. Doru -- http://mail.python.org/mailman/listinfo/python-list

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-27 Thread Roy Smith
faulkner [EMAIL PROTECTED] wrote: http://www.voidspace.org.uk/python/weblog/arch_d7_2006_12_16.shtml#e584 I looked the Selfless Python idea described there, and I think it's a REALLY bad idea. It's a clever hack, but not something I would ever want to see used in production code. Sure, it

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-27 Thread Roy Smith
Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: Use a shorter name than `self` or an editor with auto completion. Of the two, I'd strongly vote for the auto completion (assuming you feel the need to solve this problem at all). The name self is so ingrained in most Python programmers minds,

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread Bjorn Borud
[Kjetil S. Matheussen [EMAIL PROTECTED]] | | Things have probably changed a little, but the stuff in SISC isn't | specific for scheme, although a schemish language is used in the book. well, those are really two separate discussions: Scheme and whether SICP is an important book or not. -Bjørn

idestudio

2007-06-27 Thread Ron Provost
Has anyone been able to download idestudio? Any link I find on google is broken. Thanks, Ron-- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-27 Thread Paul Boddie
On 27 Jun, 14:02, Stephen R Laniel [EMAIL PROTECTED] wrote: I'd like to point again to Mark-Jason Dominus's explanation of how strong static typing can be done well: http://perl.plover.com/yak/typing/notes.html What's interesting is that the author touches on explicit attribute declarations

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-27 Thread Roy Smith
In article [EMAIL PROTECTED], Paul Boddie [EMAIL PROTECTED] wrote: On 27 Jun, 14:02, Stephen R Laniel [EMAIL PROTECTED] wrote: I'd like to point again to Mark-Jason Dominus's explanation of how strong static typing can be done well: http://perl.plover.com/yak/typing/notes.html What's

Re: What was that web interaction library called again?

2007-06-27 Thread Stian Soiland
2007/6/26, Omer Khalid [EMAIL PROTECTED]: On the RESTFul web service, I would like to piggy pack my own question two is there a way to make the connection secure between two Restful service running on GNU/linux? https? -- Stian Søiland Any society that would give up a little

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-27 Thread Sion Arrowsmith
Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-06-27, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: From My point,I think this only help python interpreter to deside where to look for. Is there anyone know's how to make the interpreter find instance name space first? Or any way to make

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-27 Thread Jorgen Bodde
I had the same feeling when I started, coming from a C++ background, I forgot about self a lot, creating local copies of what should be an assign to a class instance, or methods that could not be found because I forgot 'self' . Now I am 'kinda' used to it, as every language has some draw backs

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-27 Thread Bruno Desthuilliers
Stephen R Laniel a écrit : On Wed, Jun 27, 2007 at 01:44:17PM +0200, Bruno Desthuilliers wrote: Indeed - static typing is for compilers, not for programmers. When done well, static typing helps the programmer The closer thing to well done static typing I know is type inference (à la

Getting importError: No module named _md5

2007-06-27 Thread jeffself
I'm running Python 2.5.1 which I'm getting from the MacPort package system. I just installed Django and tried to start up the Django server and I got the following error: ImportError: No module named _md5 I'm pretty sure this is a python problem, not Django problem. I'm looking in the python2.5

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-27 Thread Stephen R Laniel
On Wed, Jun 27, 2007 at 04:03:39PM +0200, Bruno Desthuilliers wrote: Stephen, you may not know yet, but Python is *dynamic*. This defeats almost all compile-time checking. Of what help would type inference be when you can dynamically add/remove/replace attributes (including methods and

Zip File Woes

2007-06-27 Thread Robert Rawlins - Think Blue
Hello Guys, I'm having a MASSIVE headache today with zip files, I had it working a while ago but it all seems to have stopped in the past 30 minutes and I can't figure out why. I'm simply trying to write a function that will unzip a file, simple as that. I've currently got this code:

sort pygtk gtktreeview column containing dates

2007-06-27 Thread psaroudakis
Hello... I have been trying to sort a gtktreelist column that contains dates in the following format: eg: 01-Jan-1993 12-Dec-1992 etc i don't seem to be able to find any other solution than using dates in the format -MM-DD which is something i am trying to avoid.. Is there something

RE: Zip File Woes

2007-06-27 Thread Robert Rawlins - Think Blue
Just as an update guys: Before my zip code featured below I have another piece of code that creates the zip file from a binary string, like this: #f3 = open(Media/Media.zip, wb) #f3.write(base64.decodestring(MediaBinary)) #f3.close Now, with

Re: urllib interpretation of URL with ..

2007-06-27 Thread sergio
Gabriel Genellina wrote: En Tue, 26 Jun 2007 17:26:06 -0300, sergio [EMAIL PROTECTED] escribió: John Nagle wrote: In Python, of course, urlparse.urlparse, which is the main function used to disassemble a URL, has no idea whether it's being used by a client or a server, so it, reasonably

Re: Python's only one way to do it philosophy isn't good?

2007-06-27 Thread Andy Freeman
On Jun 27, 1:15 am, Paul Rubin http://[EMAIL PROTECTED] wrote: Dennis Lee Bieber [EMAIL PROTECTED] writes: What happens when two individuals release libraries using these proposed macros -- and have implement conflicting macros using the same identifiers -- and you try to use both

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-27 Thread A.T.Hofkamp
On 2007-06-27, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: HI I'm currently using Python. I find that a instance variable must confined with self, for example: class a: def __init__(self): self.aa=10 def bb(self): print self.aa # See .if in c++,I could use aa to

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread Twisted
On Jun 27, 8:26 am, [EMAIL PROTECTED] (Timofei Shatrov) wrote: For which you need an interpreter. Such as Ghostscript. Which is a pain to install and a bigger one to configure, even on Windoze. Lie. Ghostscript works out of the box on Windows. You're joking. First of all I am not a liar, and

Re: Python's only one way to do it philosophy isn't good?

2007-06-27 Thread Andy Freeman
On Jun 26, 10:03 am, Paul Rubin http://[EMAIL PROTECTED] wrote: Map doesn't work on generators or iterators because they're not part of the common lisp spec, but if someone implemented them as a library, said library could easily include a map that handled them as well. Right, more

Re: Python's only one way to do it philosophy isn't good?

2007-06-27 Thread Chris Mellon
On 6/27/07, Andy Freeman [EMAIL PROTECTED] wrote: On Jun 26, 10:03 am, Paul Rubin http://[EMAIL PROTECTED] wrote: Map doesn't work on generators or iterators because they're not part of the common lisp spec, but if someone implemented them as a library, said library could easily include

Re: simplifying algebraic expressions

2007-06-27 Thread Alex Martelli
DavidM [EMAIL PROTECTED] wrote: ... Seems that I have to allow a 'punishment free' threshold of complexity, otherwise the population stagnates. Sounds like you've hit on a good simulation of life: to get innovation, you must be very tolerant of errors!-) Alex --

16bit hash

2007-06-27 Thread Robin Becker
Is the any way to get an efficient 16bit hash in python? -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-27 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: I'm currently using Python. How long have you been using Python? I find that a instance variable must confined with self, for example: class a: def __init__(self): self.aa=10 def bb(self): print self.aa # See .if in c++,I could use aa

Re: Python's only one way to do it philosophy isn't good?

2007-06-27 Thread Chris Mellon
On 6/27/07, Douglas Alan [EMAIL PROTECTED] wrote: Paul Rubin http://[EMAIL PROTECTED] writes: Gee, that's back to the future with 1975 Lisp technology. Destructors are a much better model for dealing with such things (see not *all* good ideas come from Lisp -- a few come from C++) and I am

Re: import data.py using massive amounts of memory

2007-06-27 Thread GHUM
Note that once it has made the .pyc file the subsequent runs take even less memory than the cpickle import. Could that be the compiler compiling? Without knowing to much details about that process, but from 2.4 to 2.5 the compiler was totally exchanged, whatever to AST. That would explain the

equality comparison by default (was Re: Too many 'self' in python.That's a big flaw in this language.)

2007-06-27 Thread Alex Martelli
A.T.Hofkamp [EMAIL PROTECTED] wrote: I think that again now with the default implementation of the object.__eq__ and object.__hash__ methods. I believe these methods should not exist until the programmer explicitly defines them with a suitable notion of equivalence. Anybody have a

Re: Getting importError: No module named _md5

2007-06-27 Thread half . italian
On Jun 27, 7:04 am, jeffself [EMAIL PROTECTED] wrote: I'm running Python 2.5.1 which I'm getting from the MacPort package system. I just installed Django and tried to start up the Django server and I got the following error: ImportError: No module named _md5 I'm pretty sure this is a

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread Matthias Buelow
Bjorn Borud wrote: I was told by a lot of people I consider to be intelligent that this book would change how I think about writing software. it didn't. I didn't really know what to expect, but after reading it I did feel that its importance was greatly exaggerated. I think it's basically

Re: 16bit hash

2007-06-27 Thread Josiah Carlson
Robin Becker wrote: Is the any way to get an efficient 16bit hash in python? hash(obj)65535 - Josiah -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-27 Thread John Nagle
Bruno Desthuilliers wrote: harri a écrit : Indeed - static typing is for compilers, not for programmers. Actually, static typing is for detecting errors before the program is run. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-27 Thread John Nagle
Stephen R Laniel wrote: People on here have been ... ahhh ... *generous* about explaining that Python is dynamic, and hence that static typing doesn't make sense. I've got it. That's not really the issue. There are languages with no static typing, like Python, and there are languages

Re: Collections of non-arbitrary objects ?

2007-06-27 Thread walterbyrd
On Jun 26, 8:23 am, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: walterbyrda écrit : You do program carefully, don't you ?-) I try. But things like typos are a normal part a life. So are they in any language. I fail to see much difference here. For example: if I mis-type a

Re: Python's only one way to do it philosophy isn't good?

2007-06-27 Thread joswig
On Jun 27, 10:51 am, Paul Rubin http://[EMAIL PROTECTED] wrote: I personally use Emacs Lisp every day and I think Hedgehog Lisp (a tiny functional Lisp dialect intended for embedded platforms like cell phones--the runtime is just 20 kbytes) is a very cool piece of code. But using CL for new,

Reversing a string

2007-06-27 Thread Scott
Yeah I know strings == immutable, but question 1 in section 7.14 of How to think like a computer Scientist has me trying to reverse one. I've come up with two things, one works almost like it should except that every traversal thru the string I've gotten it to repeat the list again. This is

Re: Reversing a string

2007-06-27 Thread Will Maier
On Wed, Jun 27, 2007 at 12:53:36PM -0400, Scott wrote: So how on earth would be the best way to: Write a function that takes a string as an argument and outputs the letters backward, one per line. def rev(forward): ... backward = list(forward) ... backward.reverse()

Re: Reversing a string

2007-06-27 Thread Stefan Behnel
Scott wrote: So how on earth would be the best way to: Write a function that takes a string as an argument and outputs the letters backward, one per line. Homework? Anyway, what about: for c in string[::-1]: print c Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: Reversing a string

2007-06-27 Thread Diez B. Roggisch
Scott wrote: Yeah I know strings == immutable, but question 1 in section 7.14 of How to think like a computer Scientist has me trying to reverse one. I've come up with two things, one works almost like it should except that every traversal thru the string I've gotten it to repeat the list

Re: 16bit hash

2007-06-27 Thread Robin Becker
Josiah Carlson wrote: Robin Becker wrote: Is the any way to get an efficient 16bit hash in python? hash(obj)65535 - Josiah yes I thought of that, but cannot figure out if the internal hash really distributes the bits evenly. Particularly since it seems to treat integers etc as special

Re: Reversing a string

2007-06-27 Thread vbr
Původní zpráva Od: Will Maier [EMAIL PROTECTED] Předmět: Re: Reversing a string Datum: 27.6.2007 19:08:40 On Wed, Jun 27, 2007 at 12:53:36PM -0400, Scott wrote: So how on earth would be the best way to: Write a function

Re: Collections of non-arbitrary objects ?

2007-06-27 Thread Steve Holden
walterbyrd wrote: On Jun 26, 8:23 am, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: walterbyrda écrit : You do program carefully, don't you ?-) I try. But things like typos are a normal part a life. So are they in any language. I fail to see much difference here. For example: if I

Re: 16bit hash

2007-06-27 Thread Nick Craig-Wood
Robin Becker [EMAIL PROTECTED] wrote: Is the any way to get an efficient 16bit hash in python? Here is a 32 bit crc of which you could use the bottom 16 bits as a 16 bit hash... import binascii binascii.crc32(hello world) 222957957 crc = binascii.crc32(hello) crc =

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread Joel J. Adamson
Twisted [EMAIL PROTECTED] writes: On Jun 27, 8:26 am, [EMAIL PROTECTED] (Timofei Shatrov) wrote: For which you need an interpreter. Such as Ghostscript. Which is a pain to install and a bigger one to configure, even on Windoze. Lie. Ghostscript works out of the box on Windows. You're

Re: Collections of non-arbitrary objects ?

2007-06-27 Thread Paul Rubin
Steve Holden [EMAIL PROTECTED] writes: Think of a tuple as an ordered collection. A given element's ordinal position indicates its semantics (meaning, significance), and generally it won't make sense to iterate over the elements of a tuple (though naturally that doesn't stop people, and

Re: Python's only one way to do it philosophy isn't good?

2007-06-27 Thread Douglas Alan
Chris Mellon [EMAIL PROTECTED] writes: Is this where I get to call Lispers Blub programmers, because they can't see the clear benefit to a generic iteration interface? I think you overstate your case. Lispers understand iteration interfaces perfectly well, but tend to prefer mapping fuctions

Tabbed windows Support in Python

2007-06-27 Thread senthil arasu
Hi, Currently iam implementing GUI Framework for supporting Tabbed windows to render different HTML Pages. A row of tabs facilitated for navigation of pages. Iam expecting some classes like QTabWidget whick provided by Qt Libarary. After starting my implementation i came to know Tkinter not

Re: Set builtin lookups

2007-06-27 Thread Steve Holden
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], Evan Klitzke wrote: I have a question about the internal representation of sets in Python. If I write some code like if x in some_list: do_something() the lookup for the in statement is O(n), where n is the number of elements in

Re: Reversing a string

2007-06-27 Thread Terry Reedy
Scott [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | Yeah I know strings == immutable, but question 1 in section 7.14 of How to | think like a computer Scientist has me trying to reverse one. 'this is a test'[::-1] 'tset a si siht' --

Re: Tabbed windows Support in Python

2007-06-27 Thread Bill Scherer
senthil arasu wrote: Hi, Currently iam implementing GUI Framework for supporting Tabbed windows to render different HTML Pages. A row of tabs facilitated for navigation of pages. Iam expecting some classes like QTabWidget whick provided by Qt Libarary. After starting my implementation

Re: 16bit hash

2007-06-27 Thread Thomas Heller
Robin Becker schrieb: Josiah Carlson wrote: Robin Becker wrote: Is the any way to get an efficient 16bit hash in python? hash(obj)65535 - Josiah yes I thought of that, but cannot figure out if the internal hash really distributes the bits evenly. Particularly since it seems to treat

Re: Tabbed windows Support in Python

2007-06-27 Thread Peter Decker
On 6/27/07, senthil arasu [EMAIL PROTECTED] wrote: Hi, Currently iam implementing GUI Framework for supporting Tabbed windows to render different HTML Pages. A row of tabs facilitated for navigation of pages. Iam expecting some classes like QTabWidget whick provided by Qt Libarary. After

Re: Reversing a string

2007-06-27 Thread Neil Cerutti
On 2007-06-27, Scott [EMAIL PROTECTED] wrote: Yeah I know strings == immutable, but question 1 in section 7.14 of How to think like a computer Scientist has me trying to reverse one. No, it just wants to to print the characters in reverse, one per line. I've come up with two things, one

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread [EMAIL PROTECTED]
In article [EMAIL PROTECTED], Twisted [EMAIL PROTECTED] wrote: On Jun 25, 5:32 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: To me it's similar to memorizing a phone number by dialing it enough times that it makes its way into memory without conscious effort. I suspect that not

Re: Getting importError: No module named _md5

2007-06-27 Thread jeffself
On Jun 27, 11:54 am, [EMAIL PROTECTED] wrote: On Jun 27, 7:04 am, jeffself [EMAIL PROTECTED] wrote: I'm running Python 2.5.1 which I'm getting from the MacPort package system. I just installed Django and tried to start up the Django server and I got the following error: ImportError: No

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-27 Thread [EMAIL PROTECTED]
In article [EMAIL PROTECTED], Twisted [EMAIL PROTECTED] wrote: [ snip ] I'm wondering if getting your head around unix arcana is also dependent on an iffy knack where you get it and somehow know where to look for documentation and problem fixes, despite everything having its own

Capturing stdout from a class method

2007-06-27 Thread Falcolas
I have a rather strange situation, and I'm not sure my brief experience of Python will let me handle it properly. The situation is this: I have a Java class X which I need to call in a Jython script. The output of X is sent to stdout using the java call System.out. I need to capture this output,

ANN: PyDAO - Python Hibernate-like Object-Relational Mapper

2007-06-27 Thread cieslak . dariusz
PyDAO is very thin object-relational mapper similar to Hibernate (but much simpler). It's created to speed-up application development. It's very simple, but powerful, based on POPO (Plain Old Python Objects). http://aplikacja.info/PyDAO.html Main features: - can use any database that has

  1   2   >