Re: Hostmask matching

2006-06-03 Thread Nexu
On Sun, 2006-06-04 at 06:26 +, Marc Schoechlin wrote: > Hi ! > > Nexu <[EMAIL PROTECTED]> schrieb: > > I'm trying to write a def to match a string that is an irc hostmask. eg: > > [EMAIL PROTECTED] > > But using re.search(). I get an error when the string starts with '*'. > > What is the best

Re: Hostmask matching

2006-06-03 Thread Marc Schoechlin
Hi ! Nexu <[EMAIL PROTECTED]> schrieb: > I'm trying to write a def to match a string that is an irc hostmask. eg: > [EMAIL PROTECTED] > But using re.search(). I get an error when the string starts with '*'. > What is the best way to solve this? I suppose the problem occurs because you expression

Re: Python less error-prone than Java

2006-06-03 Thread Ilpo Nyyssönen
Christoph Zwerschke <[EMAIL PROTECTED]> writes: > What's better about the Python version? First, it will operate on > *any* sorted array, no matter which type the values have. > > But second, there is a hidden error in the Java version that the > Python version does not have. While I can see your

Re: Python less error-prone than Java

2006-06-03 Thread Alan Morgan
In article <[EMAIL PROTECTED]>, Neil Hodgson <[EMAIL PROTECTED]> wrote: >Alan Morgan wrote: > >> Since Java doesn't allow function overloading that clearly can't be >> the way. J2SE 5.0 allows generic classes and functions that operate >> on generic containers. There are some gotchas, but it's n

Re: Python less error-prone than Java

2006-06-03 Thread Neil Hodgson
Alan Morgan wrote: > Since Java doesn't allow function overloading that clearly can't be > the way. J2SE 5.0 allows generic classes and functions that operate > on generic containers. There are some gotchas, but it's not drastically > more complex than the original int-only java code. Doesn

Re: Hostmask matching

2006-06-03 Thread John Machin
On 4/06/2006 1:57 PM, Nexu wrote: > I'm trying to write a def Perhaps you mean a function? > to match a string that is an irc hostmask. eg: > [EMAIL PROTECTED] > But using re.search(). If you want to find an IRC hostmask in some longer string, yes, use re.search(). However if you want to check

Re: wxpython wxgrid question

2006-06-03 Thread rbann11
Tim Roberts wrote: > [EMAIL PROTECTED] wrote: > > > > I am looking for example code that consists of just a frame and a > >grid(10x2). The grid must fill the its parent even if the frame is > >resized. > > Have you gone through the wxPython demo application? It contains examples > of every stan

Hostmask matching

2006-06-03 Thread Nexu
I'm trying to write a def to match a string that is an irc hostmask. eg: [EMAIL PROTECTED] But using re.search(). I get an error when the string starts with '*'. What is the best way to solve this? -- http://mail.python.org/mailman/listinfo/python-list

Re: reordering elements of a list

2006-06-03 Thread Robert Kern
greenflame wrote: > Thank you all for your replies. The only thing is I do not understand > how the code is working. The following are more particular questions. Actually, these are statements, not questions. But anyways: > Travis: Iam sorry, but I do not know what list comprehension is. > Robert

Re: reordering elements of a list

2006-06-03 Thread greenflame
Thank you all for your replies. The only thing is I do not understand how the code is working. The following are more particular questions. Travis: Iam sorry, but I do not know what list comprehension is. Roberto: I do not understand the first half of the last line of your code. Also thank you for

Re: Python less error-prone than Java

2006-06-03 Thread Alan Morgan
In article <[EMAIL PROTECTED]>, Christoph Zwerschke <[EMAIL PROTECTED]> wrote: >Simon Percivall wrote: > > First: It's perfectly simple in Java to create a binary sort that > > sorts all arrays that contain objects; so wrong there. > >My point was that the *same* Java source example, directly conv

Re: Using print instead of file.write(str)

2006-06-03 Thread John Machin
On 3/06/2006 9:47 AM, Bruno Desthuilliers wrote: > > Now, given: > > bird = "parrot" > beautiful = "dead" > > How would you do the following with f.write() ? > > print "this", bird, "is", beautiful > > (without using string formating, of course...) Like this: f.write((' '.join(str(x)

Re: Proposed new PEP: print to expand generators

2006-06-03 Thread Steven Bethard
James J. Besemer wrote: > I propose that we extend the semantics of "print" such that if the > object to be printed is a generator then print would iterate over the > resulting sequence of sub-objects and recursively print each of the > items in order. I don't feel like searching for the specif

Re: reordering elements of a list

2006-06-03 Thread Christoph Zwerschke
greenflame wrote: > Suppose the main list is: mainlist = list('qwertyuiop') > Suppose the ordering list is: orderinglist = [3, 4, 2, 1] > > Then I am looking for a function that will take mainlist and > orderinglist as arguments and return the following list: > > ['e', 'r', 'w', 'q', 't', 'y', 'u

Re: Proposed new PEP: print to expand generators

2006-06-03 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "James J. Besemer" <[EMAIL PROTECTED]> wrote: > I propose that we extend the semantics of "print" such that if the object to > be printed is a generator then print would iterate over the resulting > sequence of sub-objects and recursively print each of the items

Re: Proposed new PEP: print to expand generators

2006-06-03 Thread Terry Reedy
"James J. Besemer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I propose that we extend the semantics of "print" such that if the object > to > be printed is a generator then print would iterate over the resulting > sequence of sub-objects and recursively print each of the item

Proposed new PEP: print to expand generators

2006-06-03 Thread James J. Besemer
I would like to champion a proposed enhancement to Python. I describe the basic idea below, in order to gage community interest. Right now, it's only an idea, and I'm sure there's room for improvement. And of course it's possible there's some serious "gotcha" I've overlooked. Thus I welcome

Re: Python less error-prone than Java

2006-06-03 Thread Christoph Zwerschke
Cameron Laird wrote: > So, here's my summary: Python's a nice language--a very nice one. > It's safer to use than Java in many ways. Python's typing is > STRICTER than Java's, but it's also dynamic, so people get to argue > for decades about which is a better model. Anyone who thinks typing > i

Re: Pyrex list/array

2006-06-03 Thread John Machin
On 4/06/2006 4:56 AM, Jim Lewis wrote: > I'm trying to move a function into pyrex for speed. You probably didn't expect the Inquisition; nobody does. But here it is, nice red uniforms and all: 1. What is your speed requirement and how far short of that are you at the moment? 2. Are you sure the

Re: Python less error-prone than Java

2006-06-03 Thread Christoph Zwerschke
Simon Percivall wrote: > First: It's perfectly simple in Java to create a binary sort that > sorts all arrays that contain objects; so wrong there. My point was that the *same* Java source example, directly converted to Python would *automatically* accept all kinds of arrays. No need to make a

Re: reordering elements of a list

2006-06-03 Thread Roberto Bonvallet
3 Jun 2006 17:46:49 -0700, greenflame <[EMAIL PROTECTED]>: > Suppose the main list is: mainlist = list('qwertyuiop') > > Suppose the ordering list is: orderinglist = [3, 4, 2, 1] > > Then I am looking for a function that will take mainlist and > orderinglist as arguments and return the following li

Re: reordering elements of a list

2006-06-03 Thread Travis E. Oliphant
greenflame wrote: > I am trying to reorder elements of a list and I am stuck as to what > might be the best way to approach this. I have a (main) list of > elements and another (ordering) list (which is may shorter, but not > longer than the main list) which contains the order in which I want the

reordering elements of a list

2006-06-03 Thread greenflame
I am trying to reorder elements of a list and I am stuck as to what might be the best way to approach this. I have a (main) list of elements and another (ordering) list (which is may shorter, but not longer than the main list) which contains the order in which I want the elements of the main list

Re: Python less error-prone than Java

2006-06-03 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Christoph Zwerschke <[EMAIL PROTECTED]> wrote: >You will often hear that for reasons of fault minimization, you should >use a programming language with strict typing: >http://turing.une.edu.au/~comp284/Lectures/Lecture_18/lecture/node1.html > >I just came across a

Re: Python less error-prone than Java

2006-06-03 Thread Alex Martelli
Simon Percivall <[EMAIL PROTECTED]> wrote: ... > with static typing. The equivalent in Python would have been if an > overflow exception was raised when the int got too big. It might have > been that way, typing or no typing. Indeed, it _used_ to be that way --

FreeImagePy and PIL

2006-06-03 Thread David Isaac
I am just starting to think about image processing. What are the overlaps and differences in intended functionality between FreeImagePy and PIL? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Using print instead of file.write(str)

2006-06-03 Thread Alex Martelli
Tim Roberts <[EMAIL PROTECTED]> wrote: > Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > >Sion Arrowsmith a écrit : > >> A.M <[EMAIL PROTECTED]> wrote: > >> > >>>I found print much more flexible that write method. > >> > >> "more flexible"? More convenient, yes. More powerful, maybe. But I >

Re: An oddity in list comparison and element assignment

2006-06-03 Thread Alex Martelli
Terry Reedy <[EMAIL PROTECTED]> wrote: > > it's EXACTLY the > > concatenation of three copies of that string -- no more, no less. > > Depends what one means by 'copy'. See below for your alternate wording. Please give me a reasonable definition of the unadorned word "copy" which would make this

Re: Python less error-prone than Java

2006-06-03 Thread Simon Percivall
Actually, you're wrong on all levels. First: It's perfectly simple in Java to create a binary sort that sorts all arrays that contain objects; so wrong there. Secondly: The bug has nothing to do with static typing (I'm guessing that's what you meant. Both Python and Java are strongly typed). The

Re: numpy bug

2006-06-03 Thread David Isaac
"Boris Borcic" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > after a while trying to find the legal manner to file numpy bug reports, > since it's a simple one, I thought maybe a first step is to describe the bug > here. Then maybe someone will direct me to the right channel. > > So

Re: An oddity in list comparison and element assignment

2006-06-03 Thread Terry Reedy
"Alex Martelli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Terry Reedy <[EMAIL PROTECTED]> wrote: > >> <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> > (As an aside, may I point out that Python In A Nutshell states on page >> > 46 "The result of S*n or n*S is

So what would Python be?

2006-06-03 Thread Lawrence D'Oliveiro
Just wondering... -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython wxgrid question

2006-06-03 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > > I am looking for example code that consists of just a frame and a >grid(10x2). The grid must fill the its parent even if the frame is >resized. Have you gone through the wxPython demo application? It contains examples of every standard control and almost every behav

Re: Using print instead of file.write(str)

2006-06-03 Thread Tim Roberts
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >Sion Arrowsmith a écrit : >> A.M <[EMAIL PROTECTED]> wrote: >> >>>I found print much more flexible that write method. >> >> "more flexible"? More convenient, yes. More powerful, maybe. But I >> don't see more flexible. Everything print can to stdou

Re: grouping a flat list of number by range

2006-06-03 Thread Steven Bethard
Gerard Flanagan wrote: > [EMAIL PROTECTED] wrote: >> hello, >> >> i'm looking for a way to have a list of number grouped by consecutive >> interval, after a search, for example : >> >> [3, 6, 7, 8, 12, 13, 15] >> >> => >> >> [[3, 4], [6,9], [12, 14], [15, 16]] >> >> (6, not following 3, so 3 => [3:

Python & ncurses

2006-06-03 Thread cga2000
Can anyone recommend a nice sample application that demonstrates the capabilities of python+ncurses and a clean/elegant UI? Thanks, cga -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython wxgrid question

2006-06-03 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >Hi, > > I am looking for example code that consists of just a frame and a >grid(10x2). The grid must fill the its parent even if the frame is >resized. This simple program makes a two element window, the lower half of which is a gridde

Python less error-prone than Java

2006-06-03 Thread Christoph Zwerschke
You will often hear that for reasons of fault minimization, you should use a programming language with strict typing: http://turing.une.edu.au/~comp284/Lectures/Lecture_18/lecture/node1.html I just came across a funny example in which the opposite is the case. The following is a binary search al

Re: Making a second window with Tkinter

2006-06-03 Thread greenflame
What you said about why my code is wrong is still a bit fuzzy but it worked! -- http://mail.python.org/mailman/listinfo/python-list

Re: how to erase a variable

2006-06-03 Thread greenflame
Ok thanks all! -- http://mail.python.org/mailman/listinfo/python-list

Re: carshing the interpreter in two lines

2006-06-03 Thread sam
Mel: Wow that book brings back memories. I scanned my copy to review the subject covered, and came to the conclusion that mind reading algorithms are the answer. Sam Schulenburg Mel Wilson wrote: > sam wrote: > > tomer: > > > > It is my opinion that you would loose performance if the Python > > i

wxpython wxgrid question

2006-06-03 Thread rbann11
Hi, I am looking for example code that consists of just a frame and a grid(10x2). The grid must fill the its parent even if the frame is resized. Thanks in advance, Roger -- http://mail.python.org/mailman/listinfo/python-list

Re: grouping a flat list of number by range

2006-06-03 Thread Gerard Flanagan
[EMAIL PROTECTED] wrote: > hello, > > i'm looking for a way to have a list of number grouped by consecutive > interval, after a search, for example : > > [3, 6, 7, 8, 12, 13, 15] > > => > > [[3, 4], [6,9], [12, 14], [15, 16]] > > (6, not following 3, so 3 => [3:4] ; 7, 8 following 6 so 6, 7, 8 => >

Pyrex list/array

2006-06-03 Thread Jim Lewis
I'm trying to move a function into pyrex for speed. The python side needs to pass a list to the pyrex function. Do I need to convert to array or something so pyrex can generate tight code? I'm not clear how to do this. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python + WinCE + serial port

2006-06-03 Thread Fuzzyman
pcm wrote: > Hi, > > Has anyone ever worked on a Python-WinCE-based program that involved serial > port management ? > Because of the size of the runtime and the fragility of the GUI toolkits, there has been little serious development with PythonCE. (Little not none - and it's great to have Pytho

Re: carshing the interpreter in two lines

2006-06-03 Thread Mel Wilson
sam wrote: > tomer: > > It is my opinion that you would loose performance if the Python > interpreter had the additional task of verifying byte code. It might be > more appropriate to have a preprocessor that did the verifying as it > compiled the byte code. Possibly. A good book on the topic is

Python + WinCE + serial port

2006-06-03 Thread pcm
Hi, Has anyone ever worked on a Python-WinCE-based program that involved serial port management ? Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: carshing the interpreter in two lines

2006-06-03 Thread Alex Martelli
sam <[EMAIL PROTECTED]> wrote: > tomer: > > It is my opinion that you would loose performance if the Python > interpreter had the additional task of verifying byte code. It might be > more appropriate to have a preprocessor that did the verifying as it > compiled the byte code. But in this case,

restarting multiple instances of apache - newbie Q

2006-06-03 Thread [EMAIL PROTECTED]
hi all, i am new to python programming, so thanks for your patience in advance. I have a small script that I am working on that i want to restart multiple instances of apaches on our developers servers. We have about 25 developers each with their own apache. import sys, os try: file = open(

__builtins__.loglog - logging more pythonic, decent & scalable ? - Re: "No handlers could be found for logger xxx"

2006-06-03 Thread robert
As more and more python packages are starting to use the bloomy (Java-ish) 'logging' module in a mood of responsibility and as I am not overly happy with the current "thickener" style of usage, I want to put this comment and a alternative most simple default framework for discussion. Maybe ther

Re: elementtree and inclusion of special characters

2006-06-03 Thread Fredrik Lundh
André wrote: > I'm using elementtree to process some html files, by building a tree, > manipulating it, and writing it back. One problem I encounter is that > elementtree converts some symbols in an unwanted way. For example, the > symbol ">" is converted to ">". This is fine in html code, but

Re: integer to binary...

2006-06-03 Thread Grant Edwards
On 2006-06-03, Tim Chase <[EMAIL PROTECTED]> wrote: >> The fact that they impliment the xor operator is pretty much >> proof that integers are stored in binary format -- xor is only >> defined for binary numbers. > > Um...let's not use bad logic/proofs for evidencing this... > > >>> hasattr(set(),

Re: image lib & Qt4

2006-06-03 Thread Fredrik Lundh
K.S.Sreeram wrote: > so does that mean the BGRA raw mode is supported in PIL 1.1.6? possibly; I haven't checked. it does mean that some future version will most likely support it, at least. -- http://mail.python.org/mailman/listinfo/python-list

elementtree and inclusion of special characters

2006-06-03 Thread André
I'm using elementtree to process some html files, by building a tree, manipulating it, and writing it back. One problem I encounter is that elementtree converts some symbols in an unwanted way. For example, the symbol ">" is converted to ">". This is fine in html code, but not if the page includ

ANN: PQRC - Python Quick Reference Card - v 0.55

2006-06-03 Thread Laurent Pointal
[for those who dont read clp.announce] The Python Quick Reference Card (PQRC) aims to provide a printable quick reference documentation for the Python language and some of its main standard libraries (currently for Python 2.4). PQRC tries to group informations about same/similar subject to avoid

Re: How do you practice Python?

2006-06-03 Thread James
Any code which requires serious algorithmic work I write and test in Python before converting into Java - it's so much easier to use Python's datatypes and interpreter to get things right before having to deal with Java's clunky class libraries. James On 02/06/06, Norbert Kaufmann <[EMAIL PROTECT

Re: carshing the interpreter in two lines

2006-06-03 Thread sam
tomer: It is my opinion that you would loose performance if the Python interpreter had the additional task of verifying byte code. It might be more appropriate to have a preprocessor that did the verifying as it compiled the byte code. Sam Schulenburg gangesmaster wrote: > the following (random)

Re: How do you practice Python?

2006-06-03 Thread James
Thirded here. Perhaps better for me is that although I program client-side Java for my job, as much of the backend as possible I code in Python, which makes it easier to do a lot of data processing stuff much simpler than Java would. And it's let me use and understand all of the new features of the

Re: can python be a "shell" of c++ program?

2006-06-03 Thread James
Yes you can, although it might be a fair bit of work depending on the complexity of your codebase. Basically you would need to write Python extensions to expose your C++ classes as Python modules, using SWIG or the Python extension code in the Boost C++ libraries. You'd then embed an interpreter in

Re: integer to binary...

2006-06-03 Thread Tim Chase
> The fact that they impliment the xor operator is pretty much > proof that integers are stored in binary format -- xor is only > defined for binary numbers. Um...let's not use bad logic/proofs for evidencing this... >>> hasattr(set(), "__xor__") True :) -tkc -- http://mail.python.org/mail

Re: integer to binary...

2006-06-03 Thread Grant Edwards
On 2006-06-02, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Grant Edwards a écrit : >> On 2006-06-01, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> >> >>>does anyone know a module or something to convert numbers like integer >>>to binary format ? >> >> >> They _are_ in binary format. > >

Leo 4.4.1 beta 1 released

2006-06-03 Thread Edward K. Ream
Leo 4.4.1 beta 1 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html The highlights of Leo 4.4.1: -

Re: image lib & Qt4

2006-06-03 Thread K.S.Sreeram
thanks! so does that mean the BGRA raw mode is supported in PIL 1.1.6? Regards Sreeram Fredrik Lundh wrote: > K.S.Sreeram wrote: > >> I was hacking the code trying to support RGBA mode images, and >> inadvertently i tried im.tostring("raw","BGRX") on the RGBA mode image. >> >> So BGRX does indee

carshing the interpreter in two lines

2006-06-03 Thread gangesmaster
the following (random) code crashes my interpreter (python 2.4.3/winxp): from types import CodeType as code exec code(0, 5, 8, 0, "hello moshe", (), (), (), "", "", 0, "") i would expect the interpreter to do some verifying, at least for sanity (valid opcodes, correct stack size, etc.) before exe

Re: image lib & Qt4

2006-06-03 Thread Fredrik Lundh
K.S.Sreeram wrote: > I was hacking the code trying to support RGBA mode images, and > inadvertently i tried im.tostring("raw","BGRX") on the RGBA mode image. > > So BGRX does indeed work for RGB mode images. > > While trying to support RGBA mode images, i realized that a BGRA raw > mode is neede

Re: after del list , when I use it again, prompt 'not defined'.how could i delete its element,but not itself?

2006-06-03 Thread Bruno Desthuilliers
Piet van Oostrum a écrit : >>SuperHik <[EMAIL PROTECTED]> (S) escribió: > > >>S> [EMAIL PROTECTED] wrote: >> python wrote: >after del list , when I use it again, prompt 'not defined'.how could i >delete its element,but not itself? This is a way: >>>a = range

Re: image lib & Qt4

2006-06-03 Thread K.S.Sreeram
My bad. I was hacking the code trying to support RGBA mode images, and inadvertently i tried im.tostring("raw","BGRX") on the RGBA mode image. So BGRX does indeed work for RGB mode images. While trying to support RGBA mode images, i realized that a BGRA raw mode is needed for working with QImage.

Re: Initializing an attribute that needs the object

2006-06-03 Thread Bruno Desthuilliers
David Pratt a écrit : David, please, don't top-post (fixed) > > Bruno Desthuilliers wrote: > (snip) >> >> Hint : Python classes are objects too. >> >> >> class Factory(object): >>def __init__(self, handler_class): >> self.handler = handler_class(self) >> >> class SomeHandler(object): >

Re: image lib & Qt4

2006-06-03 Thread Fredrik Lundh
K.S.Sreeram wrote: > I'm getting an 'unknown raw mode' error on ImageQt.py:59: > data = im.tostring( "raw", "BGRX" ) > > Does this only work with PIL 1.1.6 snapshots? I currently have > PIL 1.1.5. it was developed on Python 2.4.3 and PIL 1.1.5, so it should work. and BGRX support has been i

[ANN] pkipplib v0.04 is out

2006-06-03 Thread Jerome Alet
Hi there, I'm pleased to announce pkipplib v0.04 This GPLed Python library allows you to create, manage or parse IPP (Internet Printing Protocol) requests. In addition, it exposes a CUPS() class which allows one to interact with a CUPS print server (or an IPP printer). Written in pure Python, t

Re: Initializing an attribute that needs the object

2006-06-03 Thread David Pratt
Hi John. Thank you for the tips and the link. This is helpful. Many thanks. Regards David > A new-style class is one which inherits ultimately from the type that is > called "object". > > class NewStyleClass(object): > pass > > class OldStyleClass(): > pass > > Docs are a bit u

Re: image lib & Qt4

2006-06-03 Thread K.S.Sreeram
Fredrik Lundh wrote: > Fredrik Lundh wrote: > > I've posted a simple ImageQt interface module for PIL and PyQt4 here: > > http://svn.effbot.python-hosting.com/stuff/sandbox/pil/ImageQt.py > I'm getting an 'unknown raw mode' error on ImageQt.py:59: data = im.tostring( "raw", "BGRX" ) Doe

Re: [ANN] lxml 1.0 released

2006-06-03 Thread Stefan Behnel
Kent Johnson wrote: > Stefan Behnel wrote: >> Hallo everyone, >> >> I have the honour to announce the availability of lxml 1.0. >> >> http://codespeak.net/lxml/ >> >> It's downloadable from cheeseshop: >> http://cheeseshop.python.org/pypi/lxml > > Are there any plans to offer a Windows installer?

Re: An oddity in list comparison and element assignment

2006-06-03 Thread michael . f . ellis
Hey Alex, lighten up! Python is a programming language -- not your family, religion, or civil rights. Cheers, Mike Alex Martelli wrote: > <[EMAIL PROTECTED]> wrote: >... > > (As an aside, may I point out that Python In A Nutshell states on page > > 46 "The result of S*n or n*S is the concatena

Re: grouping a flat list of number by range

2006-06-03 Thread joh12005
thanks to all ! my version was far less clever/long thant the one you posted, i'm going to examine all these with much interest, and learn... best regards. -- http://mail.python.org/mailman/listinfo/python-list

Re: Missing unicode data?

2006-06-03 Thread Klaus Alexander Seistrup
Fredrik Lundh skrev: > I'm pretty sure unicodename.name() doesn't look in the Unicode- > Data file on your machine, nor in the latest file from unicode.org. I am pretty sure of that, too. I was only using those files as a reference against the unicode data that comes with my python interpreter.

Re: logging

2006-06-03 Thread Baurzhan Ismagulov
Hello Vinay, On Wed, May 31, 2006 at 03:05:13PM -0700, Vinay Sajip wrote: > > Hmm, log1 decides once whether to print an event, and after that it gets > > printed in log1 and all its ancestors, regardless of their level? I find > > this quite counter-intuitive. I'd instead expect that each logger

can python be a "shell" of c++ program?

2006-06-03 Thread key9
Hi all I have some data to process, whith complex mechanism,I put these process mechanism as plugins. and design lots of classes to abstract data themselves. but the question is how to drive them work together. That cause too much jobs: I should write UI,parser..almost a completed system.

Re: Making a second window with Tkinter

2006-06-03 Thread Rob Williscroft
greenflame wrote in news:1149305472.893535.67770 @h76g2000cwa.googlegroups.com in comp.lang.python: > Ok so I played with your script. Here is a script that more closely > mimics what I would like to do except that the way I make the variable > deckstr will be different. The only thing I am confus

Re: Missing unicode data?

2006-06-03 Thread Fredrik Lundh
Klaus Alexander Seistrup wrote: > When checking unicodedata.name() against each uchar in the file > /usr/share/unidata/UnicodeData-4.0.1d1b.txt that came with the > console-data package on my Ubuntu Linux installation a total of > 1226 unicode characters seems to be missing from the unicodedata

Re: Trying to get FreeImagePy to work.

2006-06-03 Thread Michele Petrazzo
Iain King wrote: >> I'll try out FIPY's resizing tomorrow too. OTOH, I have functions >> to convert between PIL and wxPython, and functions to convert >> betweem PIL and FIPY, but I don't see a function to convert FIPY to >> wxPython? >> > > Image at: http://www.snakebomb.com/misc/example.tif >

Re: New to Python: Do we have the concept of Hash in Python?

2006-06-03 Thread greg
A.M wrote: > In essence, Ruby language is the best, but Ruby platform is too young for > me. I'll give Ruby another two years and come back to it again. > > I found the Python language quite powerful and easy. With mature and strong > community support. Welcome aboard. It'll be interesting to

Re: Selection in Tkinter Text widget.

2006-06-03 Thread greg
Ant wrote: > Strange behaviour though (IMHO), that the selection is only shown if > the widget has focus. It's only strange if you're used to certain platforms. This is normal behaviour in the Macintosh world. One of the original Apple UI Guidelines was that there should only be one selection vis

Re: import confused by contents of working directory

2006-06-03 Thread greg
Jon wrote: > It appears that (windows) python searches in the current working > directory before looking in the local site-packages directory, or that > '.' comes first in sys.path? Unless it behaves very differently on Windows from everything else, this isn't quite true. The current directory is

Re: image lib & Qt4

2006-06-03 Thread Fredrik Lundh
Fredrik Lundh wrote: >> To get better performance, you should be able to use PIL's tostring() >> method together with the QImage(buffer, width, height, depth, >> colortable, numColors, bitOrder) form of the QImage constructor. I've posted a simple ImageQt interface module for PIL and PyQt4 here

Missing unicode data?

2006-06-03 Thread Klaus Alexander Seistrup
Hi group, I just came across the following exception: #v+ $ python Python 2.4.2 (#2, Sep 30 2005, 21:19:01) [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import unicodedata >>> u'\N{LATIN LETTER SMAL

Re: An oddity in list comparison and element assignment

2006-06-03 Thread anton . vredegoor
Alex Martelli wrote: > <[EMAIL PROTECTED]> wrote: >> Can somebody please shut down this bot? I think it's running out of > > Much as you might love for somebody to "shut me down", that > (unfortunately, no doubt, from your viewpoint) is quite unlikely to > happen. Although "making predictions

Re: wxPython problems with Fedora Core 5

2006-06-03 Thread Frank Millman
writeson wrote: > Hi all, > > I'm trying to use wxPython from a fairly new installation of Fedora > Core 5. I installed wxPython using yum -y install wxPython and that all > seemed to work fine. However, when I run Python and do this: > > import wx > > I get this: > > Traceback (most recent call l