Re: OT: excellent book on information theory

2006-01-19 Thread Ben
Hi Paul, Dr MacKay was my information studies lecturer and 4th year degree project mentor at university, about 5 years ago, and I think that this book is basically the course notes we used then! He is an excellent lecturer, and if the book is as good as the course, it should be very interesting,

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-19 Thread gregarican
Raja Raman wrote: > Hi Gregarican, > Thanks for sharing your code. One needs to add the % signs if one > wants to do wildcard searches using LIKE in the SQL server. > Do as Roger and Steve suggested '%raj%', now you can find the names > containing the word raj anywhere in the column. > just va

reportlab - ttf justify

2006-01-19 Thread maeckle
hi, i'm working with reportlab since a couple of weeks and i managed to create quite nice pdfs... there is a little problem though. since i have to create english and russian content, i use the utf8 support of registered ttf's. the only thing is that it does not support the justify-alignment in

Re: PyCon Vs. Europython

2006-01-19 Thread Magnus Lycka
Simon Burton wrote: > My employer has given me the choice to go to either Pycon or Europython > this year, > and I need some help deciding which would be more useful (for me, my > company, and python itself). > > I am mainly interested in scientific/engineering applications of > python; As far as

Re: why is my hash being weird??

2006-01-19 Thread pycraze
You are appending to the test file. How many times have you appended to it? Once? Twice? A dozen times? Just what is in the file test.py after all this time? > when input =4 > ./s 4 >test.py > >test.py is > myhash = {} > def summa(): >global myhash >myhash[0] = 0

Re: a more precise re for email addys

2006-01-19 Thread rbt
[EMAIL PROTECTED] wrote: > Does it really need to be a regular expression? Why not just write a > short function that breaks apart the input and validates each part? > > def IsEmail(addr): > 'Returns True if addr appears to be a valid email address' > > # we don't allow stuff like [EMAIL PROT

Re: Multiple modules with database access + general app design?

2006-01-19 Thread Robin Haswell
On Thu, 19 Jan 2006 15:43:58 +0100, Daniel Dittmar wrote: > Robin Haswell wrote: >> On Thu, 19 Jan 2006 14:37:34 +0100, Daniel Dittmar wrote: >>>If you use a threading server, you can't put the connection object into >>>the module. Modules and hence module variables are shared across >>>threads.

Re: Multiple modules with database access + general app design?

2006-01-19 Thread Robin Haswell
On Thu, 19 Jan 2006 06:38:39 -0800, Frank Millman wrote: > > Robin Haswell wrote: >> Hey people >> >> I'm an experience PHP programmer who's been writing python for a couple of >> weeks now. I'm writing quite a large application which I've decided to >> break down in to lots of modules (replaceme

Re: Efficient implementation of deeply nested lists

2006-01-19 Thread Peter Otten
Kay Schluehr wrote: > The structure of the sequence is not optional. Of course you can also > take the original sequence and apply: L = list([a1, [a2, [[aN, [x]]...]])  # shallow copy L[0] = b I don't understand the example. Wouldn't you have to do L[1][1]...[1] = b to change x

Re: why is my hash being weird??

2006-01-19 Thread Steve Holden
pycraze wrote: > You are appending to the test file. How many times have > you appended to it? Once? Twice? A dozen times? Just > what is in the file test.py after all this time? > > >>when input =4 > > > ./s 4 >test.py > >>test.py is >>myhash = {} >> def summa(): >> global

Re: OT: excellent book on information theory

2006-01-19 Thread Kent Johnson
Mikael Olofsson wrote: > One question here is: Are US English and UK English different languages > or not? If they are, a translation is in place. If they are not, the > text should have been left as is. I guess the answer is: > -Well, sort of... > And that is probably the reason why opinions di

Re: chi-squared tests in python?

2006-01-19 Thread Michael Anthony Maibaum
On 18 Jan 2006, at 16:07, Robert Kern wrote: > Michael Anthony Maibaum wrote: > >> Coming from the scientific community I agree. A relatively shallow >> selection of standard statistical methods would be very useful to >> avoid requiring people to install a relatively large external package >> (e

Re: How to set a wx.textctrl can editable or readonly?

2006-01-19 Thread Tim Chase
>> Additionally, you should be able to copy text from a >> read-only control, so ousting the focus may not be quite the >> right thing to do. > > Good point. Alternative approaches would be to trap > EVT_KEY_DOWN or EVT_TEXT to detect and block attempts to > modify the contents of the control. Ot

Re: OT: excellent book on information theory

2006-01-19 Thread Dave Hansen
On Thu, 19 Jan 2006 15:04:51 +0100 in comp.lang.python, Mikael Olofsson <[EMAIL PROTECTED]> wrote: >Terry Hancock wrote: >"Tim Peters" <[EMAIL PROTECTED]> wrote: >>> UK:Harry smiled vaguely back >>> US:Harry smiled back vaguely > >Terry Hancock wrote: >> I know you are pointing out the

Re: MySQLdb - Query/fetch don't return result when it *theorically* should

2006-01-19 Thread Alan Franzoni
Bernard Lebel on comp.lang.python said: > I'm absolutely flabbergasted. As I told you, i think this is related to the isolation level - I really think it's a feature of the DB you're using - this way, until you commit, your database lies in in the very same state on the same connection. Suppose

Re: Being unjust

2006-01-19 Thread Fuzzyman
Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > That's the rub though. There are lots of ways to approach web app > > frameworks. They all have their pros and cons. Deciding on one to ship > > with Python will likely be a significant challenge. > > There are maybe a half dozen plausible candi

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Claudio Grondi
Fuzzyman wrote: > (If I understand correctly...) > > The reason he is looking for it, is in order to assert that Python > 'comparison' is broken. a bit this way, but why formulate it with such a negative touch? Lets understand it more as looking for a way to get a deep understanding of the concep

Re: How can I determine an HTTPMessage ?

2006-01-19 Thread Kevin
Thanks, I was trying to get it to work with urllib instead of urllib2. The code below works. Thanks. import urllib2 as myurl url = "some url" try: myurl.urlopen(url) print "Redirecting to %s\n" % url return url except: print "An invalid login_query was spec

wxPython - x-platform menu bar color changes

2006-01-19 Thread [EMAIL PROTECTED]
Anyone know a x-platform safe way to change the color of the menu bar in wxPython? menu.SetBackgroundColor has no effect. ActiveState had a win32 specific way of changing menu bar color, but I need x-platform capability. Anyone know a solution? Thanks AK -- http://mail.python.org/mailman/list

list comprehention

2006-01-19 Thread Mathijs
Hi, Python beginner here and very much enjoying it. I'm looking for a pythonic way to find how many listmembers are also present in a reference list. Don't count duplicates (eg. if you already found a matching member in the ref list, you can't use the ref member anymore). Example1: ref=[2, 2,

Re: MySQLdb - Query/fetch don't return result when it *theorically* should

2006-01-19 Thread Bernard Lebel
Thanks a lot for the explanations Alan. That really helped. Bernard On 1/19/06, Alan Franzoni <[EMAIL PROTECTED]> wrote: > Bernard Lebel on comp.lang.python said: > > > I'm absolutely flabbergasted. > > As I told you, i think this is related to the isolation level - I really > think it's a fe

Re: New Python.org website ?

2006-01-19 Thread Fredrik Lundh
Tim Parkin wrote: > >you're complaining about the lack of manpower, and still think that lowering > >the threshold for contributions is not a priority ? at this point, this > >should > >be your *only* priority. > > If you want to contribute, then do so... so make it easy to contribute. I'm sur

Howto create this XML string?

2006-01-19 Thread Sbaush
Hi all.I've this XML:                127.0.0.1"/>            How can i write this in a Python String? I would like use a xml.dom implementation and not a banal print...print...I can't do it... Is there anyone that can explain me what is the way?Thank you!-- Sbaush

Re: Decimal vs float

2006-01-19 Thread Tim Peters
[Kay Schluehr] >> This is interesting. If we define >> >> def f(): >>print str(1.1) >> >> and disassemble the function, we get: >> > dis.dis(f) > 2 0 LOAD_GLOBAL 0 (str) > 3 LOAD_CONST 1 (1.1001) # huh? [Fredrik Lundh] > huh h

Re: how to find not the next sibling but the 2nd sibling or find sibling "a" OR sinbling "b"

2006-01-19 Thread localpricemaps
i actually realized there are 3 potentials for class names. either food or drink or dessert. so my question is whether or not i can alter your function to look like this? def isFoodOrDrinkOrDesert(attr): return attr in ['food', 'drink', 'desert'] thanks in advance for the help Kent Johns

Re: Howto create this XML string?

2006-01-19 Thread Fredrik Lundh
"Sbaush" wrote: > I've this XML: > How can i write this in a Python String? I would like use a > xml.domimplementation and not a banal print...print... > I can't do it... Is there anyone that can explain me what is the way? http://www.boddie.org.uk/python/XML_intro.html and use dom.toxml() to g

Re: reportlab - ttf justify

2006-01-19 Thread Robin Becker
maeckle wrote: > hi, > > i'm working with reportlab since a couple of weeks and i managed to > create quite nice pdfs... > there is a little problem though. since i have to create english and > russian content, i use the utf8 support of registered ttf's. the only > thing is that it does not sup

Re: list comprehention

2006-01-19 Thread Tim Chase
> Python beginner here and very much enjoying it. I'm looking > for a pythonic way to find how many listmembers are also > present in a reference list. Don't count duplicates (eg. if > you already found a matching member in the ref list, you can't > use the ref member anymore). > > Example1:

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Claudio Grondi
Steve Holden wrote: > Claudio Grondi wrote: > >> Steve Holden wrote: >> >>> Claudio Grondi wrote: >>> >>> Steven D'Aprano wrote: > Claudio Grondi wrote: > > > >> Exactly this is what Python does under the hood when writing >> a = "some string" >> b = "som

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Dave Hansen
On Thu, 19 Jan 2006 08:06:50 +0100 in comp.lang.python, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >Dave Hansen wrote: > [EMAIL PROTECTED] wrote] >> >Fuzzyman wrote: [...] >> >> In this case : >> >> >> >> a = ['some string'] >> >> b = ['somestring'] >> >> a == b >> >> False (probably) >> >That d

Re: New Python.org website ?

2006-01-19 Thread Tim Parkin
Fredrik Lundh wrote: >>Good and congratulations, it shows that the source code is well >>formatted/consistent - I wish the rest of the website html/data were so. >>If you are suggesting that your skills can do this with the rest of the >>site content then please, please help!! >> >>In fact I will

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Terry Hancock
On Thu, 19 Jan 2006 10:25:12 +0100 Claudio Grondi <[EMAIL PROTECTED]> wrote: > From the one side I am glad that Python cares about > memory allocation > for me, but on the other side I have trouble to accept, > that I have no direct access to the memory area where > data are stored in order to

Re: list comprehention

2006-01-19 Thread [EMAIL PROTECTED]
def reference(alist1,alist2): counter = 0 for x in lis: if x in ref: ref.pop(ref.index(x)) counter += 1 return counter this works I think for your examples, but you should check it against them and other cases.

Re: PyHtmlGUI Project is looking for developers

2006-01-19 Thread Veri
Fuzzyman wrote: > > So you'e creating a Python API to a GUI, which generates HTML > interfaces with appropriate callbacks to the relevant widgets. This API > *resembles* the Qt API. Exactly. > What would be nice is a compatibility layer which means that the same > application could be created fo

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Claudio Grondi
Steve Holden wrote: > Claudio Grondi wrote: > >> Steven D'Aprano wrote: > > [...] > The higher level of abstraction/indirection in Python results in making the concepts of 'value', 'having a value' or 'comparing values' useless, where it helps in C to express the difference

Re: list comprehention

2006-01-19 Thread [EMAIL PROTECTED]
revision of previous: def reference(reflist,alist2): counter = 0 for x in alist2: if x in reflist: reflist.pop(reflist.index(x)) counter += 1 return counter -- http://mail.python.org/mailman/listinfo/python-l

Re: Arithmetic sequences in Python

2006-01-19 Thread Hans Nowak
Alex Martelli wrote: > Do YOU have any good reason why > sets should print out as set(...) and lists should NOT print out as > list(...)? Is 'list' somehow "deeper" than 'set', to deserve a special > display-form syntax which 'set' doesn't get? Or are you enshrining a > historical accident to th

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Terry Hancock
On Wed, 18 Jan 2006 17:10:09 +0100 Claudio Grondi <[EMAIL PROTECTED]> wrote: > or when the objects being members of the list redefine > __eq__ so, that no matter how different they are, the > lists always compare True. If those objects have redefined __eq__ so that they are all equal in value to

Re: how to find not the next sibling but the 2nd sibling or findsibling "a" OR sinbling "b"

2006-01-19 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > i actually realized there are 3 potentials for class names. either > food or drink or dessert. so my question is whether or not i can alter > your function to look like this? > > def isFoodOrDrinkOrDesert(attr): > return attr in ['food', 'drink', 'desert'] what h

Re: Multiple modules with database access + general app design?

2006-01-19 Thread Magnus Lycka
Robin Haswell wrote: > Can anyone give me advice on making this all a bit more transparent? I > guess I really would like a method to bring all these files in to the same > scope to make everything seem to be all one application, even though > everything is broken up in to different files. This is

Zooming Idle window

2006-01-19 Thread Kamilche
Does anyone know how to automatically zoom the Idle window when you start it up? I've tried passing command line parameters, adding code to PyShell, and more, to no effect. I suspect the following will be necessary, but I don't know where to put it: import ZoomHeight ZoomHeight.zoom_height(root)

Re: Being unjust

2006-01-19 Thread Paul Boddie
Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > That's the rub though. There are lots of ways to approach web app > > frameworks. They all have their pros and cons. Deciding on one to ship > > with Python will likely be a significant challenge. There are lots of ways to approach a full Web ap

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Terry Hancock
On Thu, 19 Jan 2006 14:22:34 +0100 Claudio Grondi <[EMAIL PROTECTED]> wrote: > this is still _not_ what I am looking for, because Python > detects here the problem and throws an exception. What I > am looking for is an endless loop where there is no any > response from Python about a problem. I

Re: Multiple modules with database access + general app design?

2006-01-19 Thread Daniel Dittmar
Robin Haswell wrote: > Ah I see.. sounds interesting. Is it possible to make any module variable > local to a thread, if set within the current thread? Not directly. The following class tries to simulate it (only in Python 2.4): import threading class ThreadLocalObject (threading.local): d

Re: list comprehention

2006-01-19 Thread [EMAIL PROTECTED]
another approach: ref = [2,2,4,1,1] lis = [2,2,5,2,4] len([ref.pop(ref.index(x)) for x in lis if x in ref]) -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Claudio Grondi <[EMAIL PROTECTED]> wrote: ... > You seem here to try to give a definition of the term 'value' for > Python. If I understand it right, the definition of the term can't be > generally given for many reasons. It depends at least on type and in > adva

Re: list comprehention

2006-01-19 Thread bonono
Tim Chase wrote: > > Python beginner here and very much enjoying it. I'm looking > > for a pythonic way to find how many listmembers are also > > present in a reference list. Don't count duplicates (eg. if > > you already found a matching member in the ref list, you can't > > use the ref membe

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Grant Edwards
On 2006-01-19, Terry Hancock <[EMAIL PROTECTED]> wrote: > It is precisely this power that makes C such a dangerous > language to program in -- it's what makes it so easy to crash > your program, any other program running on the same machine, Nonsense. Under Windows 3.0 that may be true, but on a

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Christopher Subich
Claudio Grondi wrote: > The Python tutorial '3.2 The standard type hierarchy' says: > """ > Ellipsis: This type has a single value. There is a single object with > this value. This object is accessed through the built-in name Ellipsis. > It is used to indicate the presence of the "..." syntax i

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Fredrik Lundh
Grant Edwards wrote: > > It is precisely this power that makes C such a dangerous > > language to program in -- it's what makes it so easy to crash > > your program, any other program running on the same machine, > > Nonsense. Under Windows 3.0 that may be true, but on any real > OS, you can't "c

Re: New Python.org website ?

2006-01-19 Thread Gerhard Häring
Tim Parkin wrote: > Fredrik Lundh wrote: > > >>>Good and congratulations, it shows that the source code is well >>>formatted/consistent - I wish the rest of the website html/data were so. >>>If you are suggesting that your skills can do this with the rest of the >>>site content then please, pleas

Re: tools to manipulate PDF document?

2006-01-19 Thread wcc
Thanks Justin. Yes, I had tried pdftk before (could be the current version though, since it has not been upgraded for a while). But somehow it was quite slow when I tried merging, or spliting PDF documents when compared with Adobe Acrobat, especially if the number of PDF to be processed is large.

Re: New Python.org website?

2006-01-19 Thread Terry Hancock
On 18 Jan 2006 18:05:18 -0800 "Obaid R." <[EMAIL PROTECTED]> wrote: > I hope it is not counted against me that I am the first > one to point out that the logo is shaped like a cross. [...] Hey, looks more like a Yin-Yang symbol to me. ;-) > And why ask with any trepidation, Steve? People of > dif

Re: New Python.org website ?

2006-01-19 Thread skip
>> I'm assured that in print ads the only "content" anyone reads is in >> picture captions, and you damn well better make sure your message is >> conveyed there. Any other "content" only wastes space. I see no >> reason to think that a web page should be designed using any other

Re: list comprehention

2006-01-19 Thread Peter Otten
Mathijs wrote: > Python beginner here and very much enjoying it. I'm looking for a > pythonic way to find how many listmembers are also present in a reference > list. Don't count duplicates (eg. if you already found a matching member > in the ref list, you can't use the ref member anymore). > > E

Re: reportlab - ttf justify

2006-01-19 Thread maeckle
Robin Becker schrieb: > maeckle wrote: >> hi, >> >> i'm working with reportlab since a couple of weeks and i managed to >> create quite nice pdfs... >> there is a little problem though. since i have to create english and >> russian content, i use the utf8 support of registered ttf's. the only >>

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Grant Edwards
On 2006-01-19, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >> > It is precisely this power that makes C such a dangerous >> > language to program in -- it's what makes it so easy to crash >> > your program, any other program running on the same machine, >> >> Nonsense. Under Windows 3.0 that may be

Re: list comprehention

2006-01-19 Thread Peter Otten
Tim Chase wrote: > I'm a tad confused by the help, as it sounds like sets are > supposed to be first-class citizens, but in ver2.3.5 that I'm > running here (or rather "there", on a friend's box), I have to > "import sets" which I didn't see mentioned in the reference manual. set and frozenset ar

Re: list comprehention

2006-01-19 Thread Tim Chase
>> >Python beginner here and very much enjoying it. I'm looking >> > for a pythonic way to find how many listmembers are also >> > present in a reference list. Don't count duplicates (eg. if [snipped] > won't set remove duplicates which he wants to preserve ? My reading was that the solution sh

add pexpect to the standard library, standard "install" mechanism.

2006-01-19 Thread funkyj
I love pexpect because it means I may never have to use expect again (I don't do any heavy expect lifting -- I just need simple tty control)! As a python advocate I find it embarassing how difficult it is do the following in python (without pexpect): - logon to a remote system using ssh - do an '

Re: list comprehention

2006-01-19 Thread Matt
Tim Chase wrote: > > I'm a tad confused by the help, as it sounds like sets are > supposed to be first-class citizens, but in ver2.3.5 that I'm > running here (or rather "there", on a friend's box), I have to > "import sets" which I didn't see mentioned in the reference manual. > > -one of many t

Re: Duplicate entries in a matrix

2006-01-19 Thread Chris Lasher
Hey Gerard, Thanks for the suggestion! It took me a while to figure out how to get this to work. Two things were important: I needed to use the matrixmultiply() function, and the order of the two matrices being multiplied is critcial. Here's how I got the example to work. >>> from Numeric import

Re: New Python.org website ?

2006-01-19 Thread A.M. Kuchling
On Thu, 19 Jan 2006 18:34:21 +0100, Gerhard Häring <[EMAIL PROTECTED]> wrote: > If I see this correctly, Fredrik would volonteer to (help) implement > something that imports the current python.org content into a Wiki. First question I have: which wiki? Does this go into the existing Pyt

Re: OT: excellent book on information theory

2006-01-19 Thread Terry Hancock
On 19 Jan 2006 13:57:06 +0100 Anton Vredegoor <[EMAIL PROTECTED]> wrote: > Some time ago I tried to 'sell' Python to a mathematician. > The crucial point was that it was not (in standard Python) > possible to have a matrix A and a matrix B and then do for > example: > > A = A * B > > and have a m

Re: Decimal vs float

2006-01-19 Thread Magnus Lycka
Fredrik Lundh wrote: str(1.1) > > '1.1' > repr(1.1) > > '1.1001' To add to the confusion: >>> str(1.1001) '1.1' >>> repr(1.1001) '1.1001' Floating point numbers are not precise. Decimals are, so they require precise information when th

Re: New Python.org website?

2006-01-19 Thread Richard Brodie
"Terry Hancock" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > There is no "Red Yin Yang", "Red Eightfold Path", "Red Star > of David" or "Red Serpent and Rainbow" to my knowledge, and > it would be incredibly stupid for there to be any such. Not only is there a Red Star of David

XML SAX parser bug?

2006-01-19 Thread mitsura
Hi, I think I ran into a bug in the XML SAX parser. part of my program consist of reading a rather large XML file (about 10Mb) containing a few thousand elements. I have the following problem. Sometimes that SAX parses misreads a line. Let me explain: the XML file contains a few thousand lines li

Re: OT: excellent book on information theory

2006-01-19 Thread Jorge Godoy
Terry Hancock <[EMAIL PROTECTED]> writes: > I don't remember where this is posted. The trick was in > overloading the <, >, or | to interact specially with > "operator" objects. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/384122 -- Jorge Godoy <[EMAIL PROTECTED]> "Quidquid lat

Re: OT: excellent book on information theory

2006-01-19 Thread Terry Hancock
On Wed, 18 Jan 2006 18:31:35 -0800 [EMAIL PROTECTED] (Alex Martelli) wrote: > Terry Hancock <[EMAIL PROTECTED]> wrote: >... > > > Nothing at all. But I still prefer tales of people who > > > have hacked their DVD players to be multi-region :-) > > > > It isn't illegal in Canada anyway. And

Re: how to find not the next sibling but the 2nd sibling or find sibling "a" OR sinbling "b"

2006-01-19 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > i actually realized there are 3 potentials for class names. either > food or drink or dessert. so my question is whether or not i can alter > your function to look like this? > > def isFoodOrDrinkOrDesert(attr): > return attr in ['food', 'drink', 'desert'] Check

Re: Arithmetic sequences in Python

2006-01-19 Thread Steven Bethard
Steven D'Aprano wrote: > Steven Bethard wrote: > >> I'm not sure I find it truly hateful, but definitely unnecessary. >> TOOWTDI and all... > [snip] > > Even when people mean One Obvious and not Only One, it is still harmful > because the emphasis is wrong. The emphasis is on the *restrictive

Re: The Python cross? Was New Python.org website

2006-01-19 Thread Robert Boyd
On 1/18/06, Paul McGuire <[EMAIL PROTECTED]> wrote: > Looks like a plus sign to me, evoking the idea of "incremental improvement". > A cross (as in Christian symbol) really has an elongated leg to the bottom. > But it most closely resembles two snakes (see the little eyes > at the top and bottom?)

Re: Duplicate entries in a matrix

2006-01-19 Thread Robert Kern
Chris Lasher wrote: > Hello Pythonistas! > I'm looking for a way to duplicate entries in a symmetrical matrix > that's composed of genetic distances. For example, suppose I have a > matrix like the following: > > ABC > A 0.00 0.50 1.00 > B 0.50 0.00 0.50

Re: New Python.org website ?

2006-01-19 Thread Fredrik Lundh
A.M. Kuchling wrote: > > If I see this correctly, Fredrik would volonteer to (help) implement > > something that imports the current python.org content into a Wiki. > > First question I have: which wiki? Does this go into the existing > Python wiki, or into a fresh new wiki that contains *only* >

Re: XML SAX parser bug?

2006-01-19 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I think I ran into a bug in the XML SAX parser. > > part of my program consist of reading a rather large XML file (about > 10Mb) containing a few thousand elements. > I have the following problem. Sometimes that SAX parses misreads a > line. > Let me explain: the XML fil

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Claudio Grondi
Dennis Lee Bieber wrote: > On Thu, 19 Jan 2006 17:25:38 +0100, Claudio Grondi > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > >>Any hints towards enlightenment what this from the geometry known term >>'ellipsis' mean in Python? Googling shows, that I am not the first who

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Claudio Grondi
Donn Cave wrote: > In article <[EMAIL PROTECTED]>, > Claudio Grondi <[EMAIL PROTECTED]> wrote: > > >>You seem here to try to give a definition of the term 'value' for >>Python. If I understand it right, the definition of the term can't be >>generally given for many reasons. It depends at l

Re: Arithmetic sequences in Python

2006-01-19 Thread Roberto De Almeida
How about this hack: >>> import types >>> class lazy_range(object): ... def __getitem__(self, l): ... start = l[0] ... ... if isinstance(l[1], types.EllipsisType): ... step = 1 ... if len(l) > 2: ... stop = l[2] ... else: ...

Re: Convert Active Directory Object to string

2006-01-19 Thread Michael Ströder
Dirk Hagemann wrote: > > What I want to do in the end is the following: I get some data from > Active Directory, then I create a SQL-statement including this data and > write this into the database. Which API and protocol are you using to access Active Directory? If you access it via LDAP (e.g.

Re: ldap passwd need help

2006-01-19 Thread Michael Ströder
Sells, Fred wrote: > > I've got the ldap stuff working for groups, but now I'm trying to use it to > change a user password. I get a return of 2 and no error messages but it > does not change ldap. Could you please post a complete Python traceback? If you mean "2" being the LDAP error code this

Re: add pexpect to the standard library, standard "install" mechanism.

2006-01-19 Thread Fredrik Lundh
"funkyj" <[EMAIL PROTECTED]> wrote: > I love pexpect because it means I may never have to use expect again (I > don't do any heavy expect lifting -- I just need simple tty control)! > > As a python advocate I find it embarassing how difficult it is do the > following in python (without pexpect): >

Re: project ideas

2006-01-19 Thread Frank Niessink
Stephen Aichele schreef: > I'm looking for ideas for an intermediate-level python project that > would allow me to touch on the following: > > (a) use of oo design patterns in python > (b) threading > (c) socket programming > (d) wxPython gui interface > (e) possibly integrate with MySQL >

Re: New Python.org website ?

2006-01-19 Thread Fredrik Lundh
Gerhard Häring wrote: > I agree with /F that through-the-web editing would make it more likely > to get more people on board and get the conversion done in time. Plus it > would make maintanance easier once the beta from beta.python.org has > been removed. > > If I see this correctly, Fredrik woul

Re: New Python.org website ?

2006-01-19 Thread Magnus Lycka
Roel Schroeven wrote: > - The header is too empty. Maybe "The Official Python Programming > Language Website" should be there instead of under it. (I also think > that title should be shorter, maybe something simply like "The Python > Programming Language" I also think that grey header area is

Re: XML SAX parser bug?

2006-01-19 Thread mitsura
Fredrik Lundh schreef: > [EMAIL PROTECTED] wrote: > > > I think I ran into a bug in the XML SAX parser. > > > > part of my program consist of reading a rather large XML file (about > > 10Mb) containing a few thousand elements. > > I have the following problem. Sometimes that SAX parses misreads a

wxPython - is it possible to determine List Box item under a right click?

2006-01-19 Thread [EMAIL PROTECTED]
I have a list box, I'd like to generate a right click menu for items in the list box. The problem is unless I left click the item first, I can't figure out which item in the list I clicked over. So it seems to me, I need to determine the which item I right clicked over, perform a setselected on t

Re: New Python.org website?

2006-01-19 Thread Terry Hancock
On Thu, 19 Jan 2006 18:02:52 - "Richard Brodie" <[EMAIL PROTECTED]> wrote: > Not only is there a Red Star of David but it has been > causing great controversy for years in the ICRC. Google > "Red Crystal", or check Wikipedia for the story. At least, > it had some kind of resolution. "Like, OM

Re: socket.ssl with key files?

2006-01-19 Thread Martin v. Löwis
Chris Curvey wrote: > 1) Am I correct that I should just be splitting the files? Nobody knows. Just try it and report whether it works. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: excellent book on information theory

2006-01-19 Thread David H Wild
In article <[EMAIL PROTECTED]>, Mikael Olofsson <[EMAIL PROTECTED]> wrote: > One question here is: Are US English and UK English different languages > or not? A few years ago I was in a French bookshop in London. On the counter was a leaflet advertising recent translations; some were "from the

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Claudio Grondi <[EMAIL PROTECTED]> wrote: > Donn Cave wrote: ... > > exactly, "value". The realization you just had, that is so valid, > > is that it is futile to talk about value, per se. Changing the > > word you use will do nothing to improve this. > That's ri

Re: New Python.org website ?

2006-01-19 Thread A.M. Kuchling
On Thu, 19 Jan 2006 19:20:37 +0100, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > I'd prefer a separate wiki (at least initially). Do we have enough > admin resources to set up an 1.5 instance ? I doubt it's practical to run 1.3 alongside 1.5. python.org uses mod_python, so unless the Moin

Re: XML SAX parser bug?

2006-01-19 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > but how do I detect that the parser has split up the characters? I gues > I need to detect it in order to reconstruct the complete string Don't try to detect it. Instead, assume it always happens, and collect the strings in characters(), rather than processing them. Do s

Re: Is the Python binding for ncurses unicode capable?

2006-01-19 Thread Martin v. Löwis
Brian McNally wrote: > Thanks for responding to my question. I'm still a little confused > though. How can I encode unicode strings as UTF-8? My terminal does > support UTF-8, but from looking at Python's ncurses API, it looks like > all of the methods for displaying characters want an ASCII code (

Re: Python on an embedded platform

2006-01-19 Thread Martin v. Löwis
Derek wrote: > Does anybody have advice? I am looking for any tricks, features I can > disable, etc so I can get the python core to be a small as possible (<100k > would be good). Please start with describing how far you got. What did you already do, and how far did it get you? My first recomme

Re: OT: excellent book on information theory

2006-01-19 Thread Grant Edwards
On 2006-01-19, David H Wild <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, >Mikael Olofsson <[EMAIL PROTECTED]> wrote: >> One question here is: Are US English and UK English different languages >> or not? > > A few years ago I was in a French bookshop in London. On the counter wa

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Terry Hancock
On Thu, 19 Jan 2006 17:42:40 - Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2006-01-19, Fredrik Lundh <[EMAIL PROTECTED]> > wrote: > > >> > It is precisely this power that makes C such a > >dangerous > > language to program in -- it's what makes > >it so easy to crash > > your program, any o

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Terry Hancock
On Thu, 19 Jan 2006 19:30:18 +0100 Claudio Grondi <[EMAIL PROTECTED]> wrote: > Dennis Lee Bieber wrote: > > On Thu, 19 Jan 2006 17:25:38 +0100, Claudio Grondi > > <[EMAIL PROTECTED]> declaimed the following in > > comp.lang.python: > As shown just above in this thread the code: > >>> a = [1] >

Re: how to find not the next sibling but the 2nd sibling or find sibling "a" OR sinbling "b"

2006-01-19 Thread [EMAIL PROTECTED]
ok i found something that works. instead of using the def i did this: for incident in row('div', {'class': 'food' or 'drink' }): and it worked! only thing is that i think i am messing up the logic and here is why So when i run my script i get results, meaning it scrapes some stuff out, but the

Re: Sudoku solver: reduction + brute force

2006-01-19 Thread ago
> Do you think it is possible to reduce the set of all possible solutions > to a small enough set? I personally doubt it, but IF that was the case > an efficient solver could be easily created. To expand on the concept, assume for the argument sake that the universe of possible solutions can be re

Re: Python on an embedded platform

2006-01-19 Thread Grant Edwards
On 2006-01-19, Derek <[EMAIL PROTECTED]> wrote: > I am looking to port Python to an embedded platform (an ARM7 > device with fairly limited memory, capable of running an RTOS, > but not an OS, such as Linux). I came across DePython from a > few years ago, but it seems to have died a death. The ot

<    1   2   3   >