Roundup Issue Tracker release 1.1.0

2006-02-10 Thread Richard Jones
I'm proud to release this, the 1.1.0 release of Roundup. Feature: - trackers may configure custom stop-words for the full-text indexer - login may now be for a single session (and this is the default) - trackers may hide exceptions from web users (they will be mailed to the tracker admin)

pypy pycon 2006 sprint

2006-02-10 Thread holger krekel
Post-PyCon PyPy Sprint: February 27th - March 2nd 2006 The next PyPy sprint is scheduled to take place right after PyCon 2006 in Dallas, Texas, USA. We hope to see lots of newcomers at this sprint, so we'll give friendly

Re: read-only attributes

2006-02-10 Thread bruno at modulix
limodou wrote: On 2/10/06, john peter [EMAIL PROTECTED] wrote: (snip) what do i have to do if i want my application code to have read-only attributes? I think you may consider property() built-in function: property( [fget[, fset[, fdel[, doc) Return a property attribute for

Re: breaking from loop

2006-02-10 Thread Sybren Stuvel
Ritesh Raj Sarraf enlightened us with: bFound = True break return bFound I see two weird things. First of all, the retun statement won't be reached due to the break before it. Let's assume the break isn't needed, and you

Re: how to remove BR using replace function?

2006-02-10 Thread Duncan Booth
Sion Arrowsmith wrote: Duncan Booth [EMAIL PROTECTED] wrote: Although I generally advise against overuse of regular expressions, this is one situation where regular expressions might be useful: [ ... ] nobr = re.compile('\W*br.*?\W*', re.I) Agreed (on both counts), but r'\s*br.*?\s*' might

Re: Using bytecode, not code objects

2006-02-10 Thread Christos Georgiou
On Sun, 29 Jan 2006 14:51:18 -0800, rumours say that Michael Spencer [EMAIL PROTECTED] might have written: http://www.effbot.org/librarybook/marshal.htm There's a typo in the text accompanying that example: img.get_magic() should be imp.get_magic(). The error is easy to explain: he's on

Re: breaking from loop

2006-02-10 Thread Peter Otten
Ritesh Raj Sarraf wrote: Following is the code: def walk_tree_copy(sRepository, sFile, sSourceDir, bFound = None): try: if sRepository is not None: for name in os.listdir(sRepository): path = os.path.join(sRepository, name) if

Re: Question about idioms for clearing a list

2006-02-10 Thread bonono
Raymond Hettinger wrote: [Alex] So what is the rationale for having list SO much harder to use in such a way, than either set or collections.deque? Sounds like a loaded question ;-) If you're asking why list's don't have a clear() method, the answer is that they already had two ways to

Re: Detecting filename-encoding (on WinXP)?

2006-02-10 Thread Christos Georgiou
On 2 Feb 2006 08:03:14 -0800, rumours say that Tim N. van der Leeuw [EMAIL PROTECTED] might have written: So now what I need to know is, how do I find out in what encoding a particular filename is? Is there a portable way for doing this? You said the filename comes as data, and not as contents

Re: breaking from loop

2006-02-10 Thread bruno at modulix
Ritesh Raj Sarraf wrote: Hi, Following is the code: def walk_tree_copy(sRepository, sFile, sSourceDir, bFound = None): try: if sRepository is not None: You're being overly defensive here. Passing None as first arg is clearly a programming error, so the sooner you detect it

Re: Hi reliability files, writing,reading and maintaining

2006-02-10 Thread Christos Georgiou
On Wed, 08 Feb 2006 00:29:16 +0100, rumours say that Xavier Morel [EMAIL PROTECTED] might have written: You can also nest Raid arrays, the most common nesting are Raid 01 (creating Raid1 arrays of Raid0 arrays), Raid 10 (creating Raid0 arrays of Raid1 arrays), Raid 50 (Raid0 array of Raid5

Re: random playing soundfiles according to rating.

2006-02-10 Thread Ed Singleton
On 8 Feb 2006 19:49:09 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am a little bit stuck I want to play a bunch of soundfiles randomly, but i want to give each soundfile a rating (say 0-100) and have the likelihood that the file be chosen be tied to its rating so that the higher

Re: Question about idioms for clearing a list

2006-02-10 Thread Magnus Lycka
Bryan Olson wrote: Magnus Lycka wrote: Do you really have a usecase for this? It seems to me that your argument is pretty hollow. Sure: if item_triggering_end in collection: handle_end(whatever) collection.clear() Or maybe moving everything from several

Re: Question about idioms for clearing a list

2006-02-10 Thread bonono
Magnus Lycka wrote: class BryansList(list): ... add=list.append ... def clear(self): ... del self[:] ... b = BryansList([1,2,3,4,5]) b [1, 2, 3, 4, 5] b.add(6) b.clear() b [] Happy now? You can keep it, I don't need it. :) Most of us consider minimal

Re: random playing soundfiles according to rating.

2006-02-10 Thread Christos Georgiou
On Fri, 10 Feb 2006 09:59:43 +, rumours say that Ed Singleton [EMAIL PROTECTED] might have written: If speed is no issue (for example you can queue an mp3 while the current one is playing), then Ben's solution is the classic one. Store the total of all your scores (or calculate it on the fly

Re: Question about idioms for clearing a list

2006-02-10 Thread Bryan Olson
Magnus Lycka wrote: Bryan Olson wrote: Magnus Lycka wrote: Do you really have a usecase for this? It seems to me that your argument is pretty hollow. Sure: if item_triggering_end in collection: handle_end(whatever) collection.clear() Or maybe moving everything

Re: Parsing XML scheme (xsd) to python objects

2006-02-10 Thread Bizarro-02
Yes, documents should also be validated against the schema. I finally managed to compile my schema with generateDS.py but I haven't tested the result because of my poor knowledge of Python. So I have to wait until the group does which wanted to use my schema. Thanks for your answer! Matthias --

Re: Question about idioms for clearing a list

2006-02-10 Thread Raymond Hettinger
If you're asking why list's don't have a clear() method, the answer is that they already had two ways to do it (slice assignment and slice deletion) and Guido must have valued API compactness over collection polymorphism. The latter is also evidenced by set.add() vs list.append() and by

a second TKinter

2006-02-10 Thread linda.s
I found if I opened a second TKinter, Python will go out of work. But I need two graph outputs at the same time. What to do? Linda. -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining an operating system's default browser

2006-02-10 Thread Juho Schultz
John McMonagle wrote: Is there a python module which can determine an operating system's default web browser application. I would like to use it in the following context: I have a GUI application where all the documentation is written as html pages. I wish to have these html help pages

AdaptionFailure: How to use Interfaces with PyProtocols ?

2006-02-10 Thread Nebur
Hi, I tried to understand the docs of Peak's PyProtocols, and failed. I use PyProtocols v0.93 final. I fetched the ...tar.gz file for Linux and installed it using the setup.py. Here's my Hello-World-like example, that defines a Duck, which implements the given Interface: from protocols import

Re: a second TKinter

2006-02-10 Thread linda.s
On 2/10/06, Michael Foord [EMAIL PROTECTED] wrote: On 10/02/06, linda.s [EMAIL PROTECTED] wrote: I found if I opened a second TKinter, Python will go out of work. But I need two graph outputs at the same time. What to do? Linda. Hello linda (?), How are you opening a 'second

Re: pythonic exec* spawn*

2006-02-10 Thread Daniel Nogradi
os.fork() does that (on Mac and Unix). Okay, but how? Sorry, fork() is implemented strictly on a 'need to know' basis :-) It seems to me that if the process which issued os.fork() ends, then the forked process also ends. No, no, they're not a quantum mechanic photon pair. Every process

Re: Question about idioms for clearing a list

2006-02-10 Thread Bryan Olson
Raymond Hettinger wrote: [...] If you're asking why list's don't have a clear() method, the answer is that they already had two ways to do it (slice assignment and slice deletion) and Guido must have valued API compactness over collection polymorphism. That's a decision from long ago. Now

Re: module with __call__ defined is not callable?

2006-02-10 Thread Steven D'Aprano
On Wed, 08 Feb 2006 07:14:04 -0500, Steve Holden wrote: Someone had to code Python so that it raised an error when you try to call a module object. Is there a reason why module() should not execute module.__call__()? I would have thought that by the duck typing principle, it shouldn't matter

Re: Thread Dump of a python process

2006-02-10 Thread Shanon
Thank you for your info. Now I have read that a simple call os.getpid() returned the linux identifier of the thread in latest python versions, but I'm using Python 2.3 and 2.4 and this call returns always the same id I only want to take the pid of the thread but isn't as easier as it seems. --

Re: Determining an operating system's default browser

2006-02-10 Thread Fuzzyman
John McMonagle wrote: Is there a python module which can determine an operating system's default web browser application. I would like to use it in the following context: I have a GUI application where all the documentation is written as html pages. I wish to have these html help pages

Re: Determining an operating system's default browser

2006-02-10 Thread Paul Boddie
John McMonagle wrote: On Thu, 2006-02-09 at 17:53 -0600, Larry Bates wrote: You don't have to determine it. Just os.startfile('page1.html') and let the OS figure it out. Works great for Windows - not available on Unix though. Take a look at the desktop module for similar functionality for

Re: Scientific Computing with NumPy

2006-02-10 Thread linda.s
where to download numpy for Python 2.3 in Mac? Thanks! Linda -- http://mail.python.org/mailman/listinfo/python-list

help regarding installing python documentation

2006-02-10 Thread N Sharmishta-in1769c
Hi I have installed the python 2.4 version and downloaded the HTML documentation also. But when I give the command help( ) in the IDLE command prompt and ' while ' ,it says Sorry, topic and keyword documentation is not available because the PythonHTML documentation files

Re: a second TKinter

2006-02-10 Thread Steve Holden
linda.s wrote: On 2/10/06, Michael Foord [EMAIL PROTECTED] wrote: On 10/02/06, linda.s [EMAIL PROTECTED] wrote: I found if I opened a second TKinter, Python will go out of work. But I need two graph outputs at the same time. What to do? Linda. Hello linda (?), How are you opening a

Re: a second TKinter

2006-02-10 Thread linda.s
On 2/10/06, Steve Holden [EMAIL PROTECTED] wrote: linda.s wrote: On 2/10/06, Michael Foord [EMAIL PROTECTED] wrote: On 10/02/06, linda.s [EMAIL PROTECTED] wrote: I found if I opened a second TKinter, Python will go out of work. But I need two graph outputs at the same time. What to

Re: a second TKinter

2006-02-10 Thread Steve Holden
linda.s wrote: On 2/10/06, Steve Holden [EMAIL PROTECTED] wrote: linda.s wrote: On 2/10/06, Michael Foord [EMAIL PROTECTED] wrote: On 10/02/06, linda.s [EMAIL PROTECTED] wrote: I found if I opened a second TKinter, Python will go out of work. But I need two graph outputs at the same time.

Re: Pulling all n-sized combinations from a list

2006-02-10 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: But using the free SDK compiler from MS? That seems elusive. Have you seen this? http://www.vrplumber.com/programming/mstoolkit/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Too Many if Statements?

2006-02-10 Thread Magnus Lycka
slogging_away wrote: Adding it back in cause it to not run - no error message - just a return to the in the IDLE console window much as if I had executed the 'Check Module' command. What happens if you run it from the command line instead of IDLE? After all, it might be some problem in IDLE

Re: Determining an operating system's default browser

2006-02-10 Thread Sion Arrowsmith
John McMonagle [EMAIL PROTECTED] wrote: Is there a python module which can determine an operating system's default web browser application. http://docs.python.org/lib/module-webbrowser.html -- \S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/ ___ | Frankly I have no feelings

Re: AdaptionFailure: How to use Interfaces with PyProtocols ?

2006-02-10 Thread Jay Parlar
On Feb 10, 2006, at 4:21 AM, Nebur wrote: Hi, I tried to understand the docs of Peak's PyProtocols, and failed. I use PyProtocols v0.93 final. I fetched the ...tar.gz file for Linux and installed it using the setup.py. Here's my Hello-World-like example, that defines a Duck, which

Re: Is Python good for web crawlers?

2006-02-10 Thread gene tani
Paul Rubin wrote: Xavier Morel [EMAIL PROTECTED] writes: BeautifulSoup... The API of the package is extremely simple, straightforward and... obvious. I did not find that. I spent a few minutes looking at the documentation and it wasn't obvious at all how to use it. Maybe I 1. read

RE: Python-list Digest, Vol 29, Issue 147

2006-02-10 Thread Brett Cohen
nope, we where one short plus mark just pulled out so now we're two short. if you can get ANYONE that would be great? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: 10 February 2006 02:21 To: python-list@python.org Subject:

Re: anybody help me

2006-02-10 Thread Steven D'Aprano
On Fri, 10 Feb 2006 02:44:41 -0800, Rahul wrote: Hi Everybody I have some problem in my script. please help me. I'll do better: I'll help you help yourself. First step: what is the problem? Saying I have a problem and expecting us to guess what it is will not give good results. Second

Re: apostrophe or double quote?

2006-02-10 Thread Terry Hancock
On 09 Feb 2006 12:54:04 + (GMT) Sion Arrowsmith [EMAIL PROTECTED] wrote: Terry Hancock [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Just to present a complete picture, not mentioned in this thread are triple-quoted strings: [ ... ] Also in the mode of beating a dead horse ...

Re: Thread Dump of a python process

2006-02-10 Thread Peter Hansen
Shanon wrote: Thank you for your info. Now I have read that a simple call os.getpid() returned the linux identifier of the thread in latest python versions, but I'm using Python 2.3 and 2.4 and this call returns always the same id I only want to take the pid of the thread but isn't as easier

Re: Thread Dump of a python process

2006-02-10 Thread Peter Hansen
Shanon wrote: Thank you for your info. Now I have read that a simple call os.getpid() returned the linux identifier of the thread in latest python versions, but I'm using Python 2.3 and 2.4 and this call returns always the same id I only want to take the pid of the thread but isn't as easier

Re: Too Many if Statements?

2006-02-10 Thread bruno at modulix
slogging_away wrote: It appears it may not be a 'if' statment limitation at all. This is because I added another 800 element array Looks like a memory problem then... in which to store the various error messages generated when a configuration file error is deteceted based on their

Re: help regarding installing python documentation

2006-02-10 Thread Peter Hansen
N Sharmishta-in1769c wrote: Hi I have installed the python 2.4 version and downloaded the HTML documentation also. But when I give the command help( ) in the IDLE command prompt and ' while ' ,it says */Sorry, topic and keyword documentation is not available because the Python HTML

Create dict from two lists

2006-02-10 Thread py
I have two lists which I want to use to create a dictionary. List x would be the keys, and list y is the values. x = [1,2,3,4,5] y = ['a','b','c','d','e'] Any suggestions? looking for an efficent simple way to do this...maybe i am just having a brain fart...i feel like this is quit simple.

Re: Create dict from two lists

2006-02-10 Thread Diez B. Roggisch
py wrote: I have two lists which I want to use to create a dictionary. List x would be the keys, and list y is the values. x = [1,2,3,4,5] y = ['a','b','c','d','e'] Any suggestions? looking for an efficent simple way to do this...maybe i am just having a brain fart...i feel like this

Re: Create dict from two lists

2006-02-10 Thread Carsten Haese
On Fri, 2006-02-10 at 08:51, py wrote: I have two lists which I want to use to create a dictionary. List x would be the keys, and list y is the values. x = [1,2,3,4,5] y = ['a','b','c','d','e'] Any suggestions? looking for an efficent simple way to do this...maybe i am just having a

Post-PyCon PyPy Sprint: February 27th - March 2nd 2006

2006-02-10 Thread Michael Hudson
The next PyPy sprint is scheduled to take place right after PyCon 2006 in Dallas, Texas, USA. We hope to see lots of newcomers at this sprint, so we'll give friendly introductions. Note that during the Pycon conference we are giving PyPy talks which serve well as preparation. Goals and

Re: Create dict from two lists

2006-02-10 Thread Paul McGuire
py [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have two lists which I want to use to create a dictionary. List x would be the keys, and list y is the values. x = [1,2,3,4,5] y = ['a','b','c','d','e'] Any suggestions? looking for an efficent simple way to do this...maybe i

Re: breaking from loop

2006-02-10 Thread Ritesh Raj Sarraf
Thanks to everyone. It is really the best place and the best people to learn from. Here's what I followed from the discussion: def files(root): for path, folders, files in os.walk(root): for file in files: yield path, file def copy_first_match(repository, filename,

How to invoke a tkinter menu *itself*

2006-02-10 Thread Edward K. Ream
Hi, I've spent a pleasant hour or so trying to bring up a top-level Tk menu at the same spot as it would appear if I had actually clicked the menu. That is, I want to bring up a menu from the keyboard. The problem is computing the x and y args to menu.post. menu.winfo_x and

Re: Create dict from two lists

2006-02-10 Thread Xavier Morel
Diez B. Roggisch wrote: py wrote: I have two lists which I want to use to create a dictionary. List x would be the keys, and list y is the values. x = [1,2,3,4,5] y = ['a','b','c','d','e'] Any suggestions? looking for an efficent simple way to do this...maybe i am just having a brain

Re: Create dict from two lists

2006-02-10 Thread py
Thanks, itertools.izip and just zip work great. However, I should have mentioned this, is that I need to keep the new dictionary sorted. d = {1:'first', -5 : 'negative 5', 6:'six', 99:'ninety-nine', 3:'three'} keys = d.keys() keys.sort() vals = map(d.get, keys) At this point keys is sorted [-5,

Re: Mental Abuse

2006-02-10 Thread BJ in Texas
[EMAIL PROTECTED] wrote: || My abuser has been using the medical device to harass me the || last 4-5 years. I have no idea what type of a device is being || used on me. I believe the device is only available to || licensed pharmacist(s). I am not very familiar with the || intend usage of the

Re: What editor shall I use?

2006-02-10 Thread Jaroslaw Zabiello
On 8 Feb 2006 06:48:30 -0800, Lad wrote: What editor shall I use if my Python script must contain utf-8 characters? I use XP The best (and free) are: Eclipse http://www.eclipse.org/ with pydev http://pydev.sourceforge.net/ SPE http://pythonide.stani.be/ Eric3

To paletted image

2006-02-10 Thread bearophileHUGS
Hello, this time I have a question about PIL usage, maybe if Lundh has some time he can answer me. I am experimenting different color quantization algorithms, so having computed the palette with a clustering function, I use the code below to quantize the original image to produce an image without

Re: Too Many if Statements?

2006-02-10 Thread slogging_away
bruno at modulix wrote: Looks like a memory problem then... The system I am using has 2GB of memory, (unless you are syaing the memory is faulty). Why storing error messages ? Why don't you just write'em out (be it to stdout or to a file) ? I guess I could do that, (write them to a file as

Re: Create dict from two lists

2006-02-10 Thread Mikael Olofsson
py wrote: Thanks, itertools.izip and just zip work great. However, I should have mentioned this, is that I need to keep the new dictionary sorted. Dictionaries aren't sorted. Period. /MiO -- http://mail.python.org/mailman/listinfo/python-list

Re: Create dict from two lists

2006-02-10 Thread bearophileHUGS
py: Thanks, itertools.izip and just zip work great. However, I should have mentioned this, is that I need to keep the new dictionary sorted. A Python dictionary is an unsorted data structure, so you cannot have it sorted as you please. (I have seen that lot of people ask for a sorted

Re: What editor shall I use?

2006-02-10 Thread Colin J. Williams
Peter Maas wrote: Lad schrieb: What editor shall I use if my Python script must contain utf-8 characters? I use XP An extremely capable, easy to use and small editor is Neil Hodgson's SciTE. It's my favorite editor on Windows and Linux. There is a Windows installer at

Re: Too Many if Statements?

2006-02-10 Thread Kent Johnson
slogging_away wrote: bruno at modulix wrote: Why storing error messages ? Why don't you just write'em out (be it to stdout or to a file) ? I guess I could do that, (write them to a file as they are discovered). Right now the error messages are stored in the array and then the the array is

Re: Too Many if Statements?

2006-02-10 Thread slogging_away
Magnus Lycka wrote: What happens if you run it from the command line instead of IDLE? After all, it might be some problem in IDLE involved here. Even if it doesn't work correctly outside IDLE, I was thinking that IDLE might swallow some kind of error message. Excellent suggestion, (behold

Re: Create dict from two lists

2006-02-10 Thread Iain King
py wrote: Thanks, itertools.izip and just zip work great. However, I should have mentioned this, is that I need to keep the new dictionary sorted. d = {1:'first', -5 : 'negative 5', 6:'six', 99:'ninety-nine', 3:'three'} keys = d.keys() keys.sort() vals = map(d.get, keys) At this point

Re: Create dict from two lists

2006-02-10 Thread py
Iain King wrote: Short answer - you can't. Dictionaries aren't sequential structures, so they have no sorted form. You can iterate through it in a sorted manner however, as long as you keep your list of keys: keys.sort() for k in keys: print d[k] Iain duh!thanks. --

Re: Rethinking the Python tutorial

2006-02-10 Thread Ed Singleton
On 09/02/06, Magnus Lycka [EMAIL PROTECTED] wrote: While the official Python Tutorial has served its purpose well, keeping it up to date is hardly anyones top priority, and there are others who passionately create really good Python tutorials on the web. I think 'A Byte of Python' by Swaroop

Re: Too Many if Statements?

2006-02-10 Thread Steven D'Aprano
On Fri, 10 Feb 2006 06:50:25 -0800, slogging_away wrote: Excellent suggestion, (behold the power of the command line!). I ran two saved versions of the script that had produced the symptom originally described. The fist seemed to be caused by too many 'if' statements, the second by adding

Re: Too Many if Statements?

2006-02-10 Thread Juho Schultz
Steven D'Aprano wrote: On Fri, 10 Feb 2006 06:50:25 -0800, slogging_away wrote: Excellent suggestion, (behold the power of the command line!). I ran two saved versions of the script that had produced the symptom originally described. The fist seemed to be caused by too many 'if' statements,

Re: Question about idioms for clearing a list

2006-02-10 Thread Magnus Lycka
Bryan Olson wrote: Magnus Lycka wrote: Bryan Olson wrote: big_union = set() for collection in some_iter: big_union.update(t) collection.clear() I don't understand the second one. Where did 't' come from? Cut-and-past carelessness. Meant to update with

html entity to unicode

2006-02-10 Thread zunbeltz
Hi, I'm parsing html. I have a page with a lot of html enitties for hebrew characters. When i print what i get are blanks, dots and commas. How can i decode this entities to unicode charachters? TIA Zunbeltz -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple Tkinter app works in Linux, not in Windows

2006-02-10 Thread john . orlando
There is a difference between the above code and your prior code, namely in that you have explicitly instantiated Tk and put your canvas into the root toplevel. Try this in idle where it was failing: snip Problem solved...I tried James' suggestion (explicitly instantiating the root Tk

Re: Rethinking the Python tutorial

2006-02-10 Thread UrsusMaximus
There are now more than 300 tutorials listed at www.awaretek.com/tutorials.html so one could even imagine a mega-tutorial using the best-of-breed tutorial for each sub-section, a la Turbogears ;-))) Of course it might bear an unholy resemblance to a FrankenTutorial ;-))) Ron Stephens --

ordered sets operations on lists..

2006-02-10 Thread Amit Khemka
Hello, Is there a *direct* way of doing set operations on lists which preserve the order of the input lists ? For Ex. l1 = [1, 5, 3, 2, 4, 7] l2 = [3, 5, 10] and (l1 intersect l2) returns [5, 3] (and (l2 intersect l1) returns [3, 5]) thanks in advance, amit. --

Legality of using Fonts

2006-02-10 Thread Kamilche
I have a question for all you Pythoneers out there. I'm making a game with Python, and have a need for fonts. I am currently using a free TrueType font, but am considering switching to a bitmap font instead. Let's say I own a font, and use it in a paint program to 'draw some text' on a picture

[ANN] functional 0.5 released

2006-02-10 Thread Collin Winter
Hello all, I have released version 0.5 of my functional module, a collection of higher-order and functional programming tools for Python. Currently offered are tools for function composition, partial function application, plus flip, foldl, foldr, scanl and scanr functions. Two version of the

Re: Detecting filename-encoding (on WinXP)?

2006-02-10 Thread Tim N. van der Leeuw
Actually, the directory-name comes in as a URL and as such I had no problems yet just creating a unicode-string from it which I can pass to os.walk(), and get proper unicode-filenames back from it. Then I can encode them into utf-8 and pass them to the database-layer and it all works. cheers,

Re: ordered sets operations on lists..

2006-02-10 Thread bonono
Amit Khemka wrote: Hello, Is there a *direct* way of doing set operations on lists which preserve the order of the input lists ? For Ex. l1 = [1, 5, 3, 2, 4, 7] l2 = [3, 5, 10] and (l1 intersect l2) returns [5, 3] (and (l2 intersect l1) returns [3, 5]) what do you

Re: AdaptionFailure: How to use Interfaces with PyProtocols ?

2006-02-10 Thread Nebur
Yes, I adapted the instance, and it's working.That's it. Thank you ! Nebur -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter, X-windows and ebay

2006-02-10 Thread Bob Greschke
Paul Rubin http://[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bob Greschke [EMAIL PROTECTED] writes: What I came up with was the user can just create a text file (a kind of a transaction log of what things were done to the copy of the database on his machine), then cut and

Re: Jython inherit from Java class

2006-02-10 Thread Mark Fink
Alan, Kent, many thanks this really helped! But there is still a problem I guess with inheritance. I use the java testsuit supplied with the original to test the server. If I use the Java FitServer the testsuite can be completed. I commented everything out from my class and it does not work??

is there a better way?

2006-02-10 Thread [EMAIL PROTECTED]
Problem: You have a list of unknown length, such as this: list = [X,X,X,O,O,O,O]. You want to extract all and only the X's. You know the X's are all up front and you know that the item after the last X is an O, or that the list ends with an X. There are never O's between X's. I have been

Re: is there a better way?

2006-02-10 Thread Jeremy Sanders
[EMAIL PROTECTED] wrote: You have a list of unknown length, such as this: list = [X,X,X,O,O,O,O]. You want to extract all and only the X's. You know the X's are all up front and you know that the item after the last X is an O, or that the list ends with an X. There are never O's between

Re: Newbie Q: dynamically assigning object attribute

2006-02-10 Thread Sion Arrowsmith
Ben Wilson [EMAIL PROTECTED] wrote: I would like to dynamically assign object attributes: dict = { a : 1, b : 2, } for key,val in dict : obj.key = val I've googled to no effect, or maybe I'm needing to be hit with the appropriately sized clue-by-four. The conventional clue-by-four applied

Re: Are there memory limits for external C modules?

2006-02-10 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: I was able to modify my C code so that instead of being a Python module, it runs as a standalone binary, and it works as it should. Calling it with os.spawn* works. The two versions are essentially the same, the primary differences being the necessary difference in

Re: is there a better way?

2006-02-10 Thread snoe
[EMAIL PROTECTED] wrote: Problem: You have a list of unknown length, such as this: list = [X,X,X,O,O,O,O]. You want to extract all and only the X's. You know the X's are all up front and you know that the item after the last X is an O, or that the list ends with an X. There are never O's

Re: is there a better way?

2006-02-10 Thread Tim Chase
You have a list of unknown length, such as this: list = [X,X,X,O,O,O,O]. You want to extract all and only the X's. You know the X's are all up front and you know that the item after the last X is an O, or that the list ends with an X. There are never O's between X's. I have been using

Re: is there a better way?

2006-02-10 Thread Paul McGuire
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Problem: You have a list of unknown length, such as this: list = [X,X,X,O,O,O,O]. You want to extract all and only the X's. You know the X's are all up front and you know that the item after the last X is an O, or that the list ends

Re: is there a better way?

2006-02-10 Thread Paul McGuire
Paul McGuire [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Problem: You have a list of unknown length, such as this: list = [X,X,X,O,O,O,O]. You want to extract all and only the X's. You know the X's are all up

Re: get output of cmd-line command under MS windows

2006-02-10 Thread calmar
On 2006-02-08, Bernard Lebel [EMAIL PROTECTED] wrote: Hi Bernhard and all, oPipe = os.popen( run C:/program files/my app/executable.exe ) while 1: sLine = oPipe.read() print sLine if sLine == '': print 'No more line from pipe, exit.' break

Re: random playing soundfiles according to rating.

2006-02-10 Thread Ben Cartwright
kpp9c wrote: I've been looking at some of the suggested approaches and looked a little at Michael's bit which works well bisect is a module i always struggle with (hee hee) I am intrigued by Ben's solution and Ben's distilled my problem quite nicely Thanks!-) Actually, you should use

ANN: Python interface to Microsoft Outlook Web Access

2006-02-10 Thread Adrian Holovaty
Hi all, Because I telecommute, I'm limited to using my company's webmail interface, Microsoft Outlook Web Access, rather than having direct POP or IMAP access to e-mail. This isn't ideal, for several reasons: * Outlook Web Access has a horrendous user interface in any browser other than

Martin Franklin's Tkinter/Tile wrapper--where'd it go?

2006-02-10 Thread Kevin Walzer
I believe Martin Franklin wrote a Tile.py wrapper for the Tk/Tile extension, which adds theming to the core Tk widget set. It used to reside here: http://mfranklin.is-a-geek.org/docs/Tile/index.html That server seems to be down. Anyone know if the wrapper is available elsewhere? Or if someone

Re: Tkinter, X-windows and ebay

2006-02-10 Thread Cameron Laird
In article [EMAIL PROTECTED], Bob Greschke [EMAIL PROTECTED] wrote: Paul Rubin http://[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Bob Greschke [EMAIL PROTECTED] writes: What I came up with was the user can just create a text file (a kind of a transaction log of what things were

Re: by reference

2006-02-10 Thread dirvine
Thanks but I am a bit unsure as to what error I have made by posting this question. I am not trying to be funny but can you give me a pointer to the issue. Many thanks David -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie Q: dynamically assigning object attribute

2006-02-10 Thread Ben Wilson
Well, my Perl way of doing it would be to have all attributes in a dict (hash), then create the accessor vi a dynamic function. I knew Python would have a right way to do it for Python, but when I went looking I neglected to look at the core of the language. I suppose I'm just too accustomed to

Re: ordered sets operations on lists..

2006-02-10 Thread Scott David Daniels
Amit Khemka wrote: Hello, Is there a *direct* way of doing set operations on lists which preserve the order of the input lists ? Nope For Ex. l1 = [1, 5, 3, 2, 4, 7] l2 = [3, 5, 10] and (l1 intersect l2) returns [5, 3] (and (l2 intersect l1) returns [3, 5])

Re: Legality of using Fonts

2006-02-10 Thread Scott David Daniels
Kamilche wrote: I have a question for all you Pythoneers out there. I'm making a game with Python, and have a need for fonts. I am currently using a free TrueType font, but am considering switching to a bitmap font instead. Let's say I own a font, and use it in a paint program to

Re: is there a better way?

2006-02-10 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: Problem: You have a list of unknown length, such as this: list = [X,X,X,O,O,O,O]. You want to extract all and only the X's. You know the X's are all up front and you know that the item after the last X is an O, or that the list ends with an X. There are never O's

Re: ordered sets operations on lists..

2006-02-10 Thread Raymond Hettinger
[Amit Khemka] Hello, Is there a *direct* way of doing set operations on lists which preserve the order of the input lists ? For Ex. l1 = [1, 5, 3, 2, 4, 7] l2 = [3, 5, 10] and (l1 intersect l2) returns [5, 3] (and (l2 intersect l1) [bonono] what do you mean

Re: is there a better way?

2006-02-10 Thread Schüle Daniel
[...] What not for x in list: if x == O: break storage.append(x) i think this may take too long better aproach would be to test for zero from the end Regards, Daniel -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >