Better performance

2008-06-01 Thread Franck Y
Hello Folks, I am facing a problem where i need to parse around 200 files, i have a bit of knowledge in PHP/Perl/Python (the magic P :-P) Which one would you suggest me since i have to generate a web interface ? And each one has his area of 'work' Thanks for your help ! -- http://mail.python

Better performance

2008-06-01 Thread Franck Y
Hello Folks, I am facing a problem where i need to parse around 200 files, i have a bit of knowledge in PHP/Perl/Python (the magic P :-P) Which one would you suggest me since i have to generate a web interface ? And each one has his area of 'work' Thanks for your help ! -- http://mail.python

Re: Good grid + calendar, etc.?

2008-06-01 Thread Michael Torrie
Gilles Ganault wrote: >> The grid can be quite advanced. Did you look at the wxPython demo? Or >> Dabo? > > Yes, but although the basic wigets are just fine, wxGrid looks a bit > like the basic TStringGrid in Delphi, ie. it's pretty basic so that > several vendors came up with enhanced alternative

Re: a question about the #prefix of sys.argv

2008-06-01 Thread Aldarion
On 6月2日, 上午8时05分, Peter Otten <[EMAIL PROTECTED]> wrote: > Aldarion wrote: > > for the little script > > #egg.py > > import sys > > for k,v in enumerate(sys.argv): > > print k,v > > > it ignores the part after # on linux > > below is the running output on windows and linux. no clue here. > > This

Re: a question about the #prefix of sys.argv

2008-06-01 Thread John Machin
On Jun 2, 9:54 am, Aldarion <[EMAIL PROTECTED]> wrote: > for the little script > #egg.py > import sys > for k,v in enumerate(sys.argv): > print k,v > > it ignores the part after # on linux Perhaps "it" is the linux shell ... > below is the running output on windows and linux. no clue here. >

Re: a question about the #prefix of sys.argv

2008-06-01 Thread Peter Otten
Aldarion wrote: > for the little script > #egg.py > import sys > for k,v in enumerate(sys.argv): > print k,v > > it ignores  the part after # on linux > below is the running output on windows and linux. no clue here. This has nothing to do with python, it's the shell that treats the # and everyt

a question about the #prefix of sys.argv

2008-06-01 Thread Aldarion
for the little script #egg.py import sys for k,v in enumerate(sys.argv): print k,v it ignores the part after # on linux below is the running output on windows and linux. no clue here. D:\python\note>egg.py #test 0 D:\python\note\egg.py 1 #test D:\python\note>egg.py for bar #spam egg 0 D:\pyt

Re: php vs python

2008-06-01 Thread Joel Koltner
"Ethan Furman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Jerry Stuckle wrote: > > As I've said before - good programmers can write good code in any > > language. > So... an eloquent speaker of English is also an eloquent speaker of > Spanish/French/German? There's potentially

Python-URL! - weekly Python news and links (May 26)

2008-06-01 Thread Gabriel Genellina
QOTW: "GHUM: There are no big applications written in Python. GHUM: Big applications are written in JAVA or COBOL or C# or other legacy programming systems. GHUM: If you programm in Python, your applications become quite small. Only frameworks in Python are big. JMC: So the fact that there

Python needn't apologize (was: Using Python for programming algorithms)

2008-06-01 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, sturlamolden <[EMAIL PROTECTED]> wrote: >On May 18, 5:46 am, "inhahe" <[EMAIL PROTECTED]> wrote: > >> The numbers I heard are that Python is 10-100 times slower than C. > >Only true if you use Python as if it was a dialect of Visual Basic. If >you use the right tool

Re: The Importance of Terminology's Quality

2008-06-01 Thread Arne Vajhøj
szr wrote: Arne Vajhøj wrote: szr wrote: Peter Duniho wrote: On Fri, 30 May 2008 22:40:03 -0700, szr <[EMAIL PROTECTED]> wrote: Arne Vajhøj wrote: Stephan Bour wrote: Lew wrote: } John Thingstad wrote: } > Perl is solidly based in the UNIX world on awk, sed, } > bash and C. I don't like the

Re: Good grid + calendar, etc.?

2008-06-01 Thread Fuzzyman
On Jun 1, 1:43 pm, Gilles Ganault <[EMAIL PROTECTED]> wrote: > On Sun, 1 Jun 2008 21:27:30 +0900, "Ryan Ginstrom" > > <[EMAIL PROTECTED]> wrote: > >For your stated needs, I'd advise checking out IronPython or Python.NET > >(which allow use of .NET GUI libraries). > > Thanks but I forgot to say that

*** How the "RASCAL" President Woodrow Wilson was blackmailed like PUPPET by the AGGRESIVE, MANIPULATIVE KHAZAR Zionists ***

2008-06-01 Thread lemnitzer
Google is Khazar owned and controlled company. The Khazars plan to electronify and accumulate the whole intellectual property on earth, esp US, Europe and Australia thru google and already have accumulated all the mint items in google Israel. This they must do before launching their ARMAGEDDON. Sin

??? The most EVIL MOTIVE force in HISTORY - The SCHEMING, MANIPULATING and AGGRESSIVE KHAZAR - now also ZIONIST ???

2008-06-01 Thread lemnitzer
Full Article: http://iamthewitness.com/FreedmanFactsAreFacts.html < KEY DOCUMENT Steamy Excerpts: Will you be patient with me while I review here as briefly as I can the history of that political emergence and disappearance of a nation from the pages of history? In the year 1948 in the

Re: convert binary to float

2008-06-01 Thread Mark Tolonen
"George Sakkis" <[EMAIL PROTECTED]> wrote in message news:829b1e8f-baac-4ff4-909b->[EMAIL PROTECTED] On Jun 1, 3:55 pm, Mason <[EMAIL PROTECTED]> wrote: I have tried and tried... I'd like to read in a binary file, convert it's 4 byte values into floats, and then save as a .txt file. This works

Re: convert binary to float

2008-06-01 Thread Mason
On Jun 1, 6:41 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 1 Jun 2008 12:55:45 -0700 (PDT), Mason > <[EMAIL PROTECTED]> declaimed the following in > comp.lang.python: > > > I have tried and tried... > > > I'd like to read in a binary file, convert it's 4 byte values into > > floats,

Re: Good grid + calendar, etc.?

2008-06-01 Thread Mike Driscoll
On Jun 1, 8:28 am, Gilles Ganault <[EMAIL PROTECTED]> wrote: > On Sun, 1 Jun 2008 06:00:03 -0700 (PDT), Mike Driscoll > > <[EMAIL PROTECTED]> wrote: > >I recall that there is an advanced calendar widget that's been made by > >one of the regulars on the wxPython list, but it's not a part of the > >o

Re: convert binary to float

2008-06-01 Thread Mason
On Jun 1, 5:12 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Jun 1, 3:55 pm, Mason <[EMAIL PROTECTED]> wrote: > > > > > I have tried and tried... > > > I'd like to read in a binary file, convert it's 4 byte values into > > floats, and then save as a .txt file. > > > This works from the command

Re: Python's doc problems: sort

2008-06-01 Thread szr
Jürgen Exner wrote: > "Andrew Koenig" <[EMAIL PROTECTED]> wrote: >> <[EMAIL PROTECTED]> wrote in message > > [Subject: Python's doc problems: sort] >>> I want to emphasize a point here, as i have done quite emphatically >>> in the past. The Python documentation, is the world's worst >>> technical

Re: Bring object 'out of' Class?

2008-06-01 Thread dave
Then you can write: hands = deck.deal_cards(4, 5) # On fait une belotte? And I don't see the need of defining 'Hand' inside 'Deck'. HTH Thanks for the input. I believe using 'class Hand(Deck):' is to illustrate (in the book) inheritance and how it can be used. By using 'Hand(Deck)' I can

Re: convert binary to float

2008-06-01 Thread George Sakkis
On Jun 1, 3:55 pm, Mason <[EMAIL PROTECTED]> wrote: > I have tried and tried... > > I'd like to read in a binary file, convert it's 4 byte values into > floats, and then save as a .txt file. > > This works from the command line (import struct); > >     In [1]: f = open("test2.pc0", "rb") >     In [

convert binary to float

2008-06-01 Thread Mason
I have tried and tried... I'd like to read in a binary file, convert it's 4 byte values into floats, and then save as a .txt file. This works from the command line (import struct); In [1]: f = open("test2.pc0", "rb") In [2]: tagData = f.read(4) In [3]: tagData Out[3]: '\x00\x00\x

pyspread 0.0.7

2008-06-01 Thread Martin Manns
pyspread 0.0.7 has been released. -- New features: + CSV import dialog with preview grid Bug fixes: + setup.py now installs correctly into a sub-folder (tested for Linux and WinXP). -- About: pyspread is a spreadsheet that accepts a pure python expression in each cell. -- Highlights: + No n

Re: Python's doc problems: sort

2008-06-01 Thread J�rgen Exner
"Andrew Koenig" <[EMAIL PROTECTED]> wrote: ><[EMAIL PROTECTED]> wrote in message [Subject: Python's doc problems: sort] >> I want to emphasize a point here, as i have done quite emphatically in >> the past. The Python documentation, is the world's worst technical And WTF does Python documentati

Re: Integrating a code generator into IDLE

2008-06-01 Thread Diez B. Roggisch
Sam Denton schrieb: Code generators seem to be popular in Python. (http://www.google.com/search?q=python+code-generator) Certainly not. The most of them will be used for generating bindings. Apart from that, you rareley (if ever) need to generate code. I have one that I'd like to integrate i

Re: Question about files?

2008-06-01 Thread Lie
On Jun 1, 1:44 am, [EMAIL PROTECTED] wrote: > I want to create a program where a user can type what ever they want > to, have it saved to a file, and the be able to re-open it and read > it. How would I do this? Thanks! Use a multi-line text-input widget (available on any widget library) To open

Re: How to get all the variables in a python shell

2008-06-01 Thread Lie
On May 29, 1:47 pm, [EMAIL PROTECTED] wrote: > Hi! > > I'm currently working on a scientific computation software built in > python. > What I want to implement is a Matlab style command window <-> > workspace interaction. > > For example, you type 'a=1' in the command window, and you see a list > i

Re: How to get all the variables in a python shell

2008-06-01 Thread Lie
On Jun 2, 1:29 am, Lie <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi! > > > I'm currently working on a scientific computation software built in > > python. > > What I want to implement is a Matlab style command window <-> > > workspace interaction. > > > For example, you type 'a=1' i

Re: python's setuptools (eggs) vs ruby's gems survey/discussion

2008-06-01 Thread rurpy
On Jun 1, 2:47 am, Alia Khouri <[EMAIL PROTECTED]> wrote: > Can we open up the discussion here about how to improve setuptools > which has become the de facto standard for distributing / installing > python software. I've been playing around with ruby's gems which seems > to be more more mature and

Re: SPOJ, Problem Code: sumtrian, Reducing time taken to solve.

2008-06-01 Thread Ian Kelly
On Sun, Jun 1, 2008 at 7:25 AM, Shriphani <[EMAIL PROTECTED]> wrote: > I was trying to solve the sumtrian problem in the SPOJ problem set > ( https://www.spoj.pl/problems/SUMTRIAN/ ) and this is the solution I > submitted: http://pastebin.ca/1035867 > > The result was, "Your solution from 2008-06-0

Re: ValueError: unknown locale: UTF-8

2008-06-01 Thread Martin v. Löwis
> ValueError: unknown locale: UTF-8 > > This is on open bug or is there more to it? Do you have an environment variable set who is named either LANG or starts with LC_? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: python, dlls, and multiple instances

2008-06-01 Thread Martin v. Löwis
> Is it a correct to assume that you can use multiple instances of > python altogether if each is loaded from a separate dll? For instance, > if I write a couple of dll/so libs, and each has python statically > linked in, is it safe to assume that since dlls use their own address > space DLLs don'

Re: How to get all the variables in a python shell

2008-06-01 Thread Lie
[EMAIL PROTECTED] wrote: > Hi! > > I'm currently working on a scientific computation software built in > python. > What I want to implement is a Matlab style command window <-> > workspace interaction. > > For example, you type 'a=1' in the command window, and you see a list > item named 'a' in the

Re: SPOJ, Problem Code: sumtrian, Reducing time taken to solve.

2008-06-01 Thread Henrique Dante de Almeida
On Jun 1, 10:25 am, Shriphani <[EMAIL PROTECTED]> wrote: > Hi, > > I was trying to solve the sumtrian problem in the SPOJ problem set > (https://www.spoj.pl/problems/SUMTRIAN/) and this is the solution I > submitted:http://pastebin.ca/1035867 > > The result was, "Your solution from 2008-06-01 15:13

Printing a text file using Python

2008-06-01 Thread Robin Lee
Serge: in your code i believe that you did one read of your whole input file, and then you emitted that to the dc with textout. textout's use is actually (x,y,string). hence one line got printed (actually the whole file got printed but truncated) you will have to detect all the end of lines

Re: [Business apps for Windows] Good grid + calendar, etc.?

2008-06-01 Thread Stef Mientki
Ryan Ginstrom wrote: On Behalf Of Gilles Ganault Is it hopeless, or did I overlook things? Are there other solutions I should look at (FLTK, etc.)? For those of you writing business apps in Python for Windows, how do things go as far as GUI widgets are concerned? To do a bit of shamele

Re: the pipe reading in Thread dose not work.

2008-06-01 Thread Jean-Paul Calderone
On Sun, 1 Jun 2008 07:32:39 -0700 (PDT), Leon zhang <[EMAIL PROTECTED]> wrote: #!/usr/bin/env python # -*- coding: utf-8 -*- import string, sys from threading import Thread import os import time class test_pipe(Thread): def __init__(self, fd): Thread.__init__(self) self.testfd

Re: Good grid + calendar, etc.?

2008-06-01 Thread Mike Driscoll
On Jun 1, 8:28 am, Gilles Ganault <[EMAIL PROTECTED]> wrote: > On Sun, 1 Jun 2008 06:00:03 -0700 (PDT), Mike Driscoll > > <[EMAIL PROTECTED]> wrote: > >I recall that there is an advanced calendar widget that's been made by > >one of the regulars on the wxPython list, but it's not a part of the > >o

Re: Conjunction List

2008-06-01 Thread George Sakkis
On May 31, 8:01 pm, [EMAIL PROTECTED] wrote: > http://codepad.org/MV3k10AU > > I want to write like next one. > > def conjunction(number=a[1],name=b[1],size=c[1]): > flag = a[0]==b[0]==c[0] > if flag: > for e in zip(number,name,size): > print e > > conjunction(a,b,c) > > -

Re: [Business apps for Windows] Good grid + calendar, etc.?

2008-06-01 Thread TheSaint
On 19:59, domenica 01 giugno 2008 Gilles Ganault wrote: > require rich widgets like (DB)grids, calendars, etc. Qt seems to go a bit further. Try Eric4 as SDK. -- Mailsweeper Home : http://it.geocities.com/call_me_not_now/index.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Integrating a code generator into IDLE

2008-06-01 Thread Marc 'BlackJack' Rintsch
On Sun, 01 Jun 2008 10:40:09 -0500, Sam Denton wrote: > Code generators seem to be popular in Python. I don't think so. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: [Business apps for Windows] Good grid + calendar, etc.?

2008-06-01 Thread Gilles Ganault
On Sun, 01 Jun 2008 11:24:17 -0400, [EMAIL PROTECTED] wrote: >Instead of the COM approach, have you considered using a local, client >based Python server as a container for your business logic and GUI >(DHTML, AJAX)? But web-based apps are even worse, since the set of widgets is even more basic, a

ANN: equivalence 0.1

2008-06-01 Thread George Sakkis
Equivalence is a class that can be used to maintain a partition of objects into equivalence sets, making sure that the equivalence properties (reflexivity, symmetry, transitivity) are preserved. Two objects x and y are considered equivalent either implicitly (through a key function) or explicitly b

Re: Bring object 'out of' Class?

2008-06-01 Thread member thudfoo
On 6/1/08, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > dave <[EMAIL PROTECTED]> writes: > [..] > > > >def deal_cards(self, num_of_hands, num): > >'''deals x amount of cards(num) to each hand''' > >for i in range(num_of_hands): > >handname = Hand('hand%d' % i)

Integrating a code generator into IDLE

2008-06-01 Thread Sam Denton
Code generators seem to be popular in Python. (http://www.google.com/search?q=python+code-generator) I have one that I'd like to integrate into IDLE. Ideally, I'd like to (1) have a new file type show up when I use the File/Open dialog, and (2) have a function key that lets me run my generato

RE: [Business apps for Windows] Good grid + calendar, etc.?

2008-06-01 Thread Ryan Ginstrom
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Instead of the COM approach, have you considered using a > local, client based Python server as a container for your > business logic and GUI (DHTML, AJAX)? This would give you a > cross platform solution, without the typical browser/server

Re: Python's doc problems: sort

2008-06-01 Thread Andrew Koenig
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I want to emphasize a point here, as i have done quite emphatically in > the past. The Python documentation, is the world's worst technical > writing. As far as technical writing goes, it is even worse than > Perl's in my opinion. I t

RE: [Business apps for Windows] Good grid + calendar, etc.?

2008-06-01 Thread python
Ryan, If you don't mind being Windows-only, there's another approach that I've been working on. I use a WTL application to host the web browser, then pass the browser instance to a COM server written in Python, along with a COM wrapper of the application window. This gives me the flexibility of H

the pipe reading in Thread dose not work.

2008-06-01 Thread Leon zhang
#!/usr/bin/env python # -*- coding: utf-8 -*- import string, sys from threading import Thread import os import time class test_pipe(Thread): def __init__(self, fd): Thread.__init__(self) self.testfd = fd def run(self): print "started thread begin -" w

Re: python's setuptools (eggs) vs ruby's gems survey/discussion

2008-06-01 Thread Paul Boddie
On 1 Jun, 10:47, Alia Khouri <[EMAIL PROTECTED]> wrote: > Can we open up the discussion here about how to improve setuptools > which has become the de facto standard for distributing / installing > python software. I've been playing around with ruby's gems which seems > to be more more mature and

Re: python's setuptools (eggs) vs ruby's gems survey/discussion

2008-06-01 Thread Carl Banks
On Jun 1, 4:47 am, Alia Khouri <[EMAIL PROTECTED]> wrote: > Can we open up the discussion here about how to improve setuptools > which has become the de facto standard for distributing / installing > python software. I've been playing around with ruby's gems which seems > to be more more mature and

Re: Good grid + calendar, etc.?

2008-06-01 Thread Gilles Ganault
On Sun, 1 Jun 2008 06:00:03 -0700 (PDT), Mike Driscoll <[EMAIL PROTECTED]> wrote: >I recall that there is an advanced calendar widget that's been made by >one of the regulars on the wxPython list, but it's not a part of the >official distribution at this time. You'll have to ask about calendar >wid

SPOJ, Problem Code: sumtrian, Reducing time taken to solve.

2008-06-01 Thread Shriphani
Hi, I was trying to solve the sumtrian problem in the SPOJ problem set ( https://www.spoj.pl/problems/SUMTRIAN/ ) and this is the solution I submitted: http://pastebin.ca/1035867 The result was, "Your solution from 2008-06-01 15:13:06 to problem SUMTRIAN, written in Python, has exceeded the allow

Re: [Business apps for Windows] Good grid + calendar, etc.?

2008-06-01 Thread Gilles Ganault
On Sun, 1 Jun 2008 21:59:29 +0900, "Ryan Ginstrom" <[EMAIL PROTECTED]> wrote: >wxPython can be made to look pretty nice. Check out Chandler for an example. >http://chandlerproject.org/ Yup, they developped some nice-looking widgets, but it doesn't seem like there's an ecosystem around wxWidgets. I

Re: Good grid + calendar, etc.?

2008-06-01 Thread Mike Driscoll
On Jun 1, 6:59 am, Gilles Ganault <[EMAIL PROTECTED]> wrote: > Hello > >         Since Python is such a productive language, I'd really like to be > able to use it to write GUI apps for Windows, but business apps > require rich widgets like (DB)grids, calendars, etc. > > The ones available in wxWid

RE: [Business apps for Windows] Good grid + calendar, etc.?

2008-06-01 Thread Ryan Ginstrom
> On Behalf Of Gilles Ganault > Thanks but I forgot to say that I'd rather not use .Net > because deployment/updates are too problematic for our audience. > > .. that's assuming that a GUI Python can install/update > itself as easily as eg. Delphi, which is where I could be wrong :-/ wxPython c

Re: [Business apps for Windows] Good grid + calendar, etc.?

2008-06-01 Thread Gilles Ganault
On Sun, 1 Jun 2008 21:27:30 +0900, "Ryan Ginstrom" <[EMAIL PROTECTED]> wrote: >For your stated needs, I'd advise checking out IronPython or Python.NET >(which allow use of .NET GUI libraries). Thanks but I forgot to say that I'd rather not use .Net because deployment/updates are too problematic fo

Re: Need Tutorial For the following lib

2008-06-01 Thread Gandalf
On Jun 1, 1:41 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > Gandalf wrote: > > Hi scott, you couldn't be more wrong about my laziness. I straggle > > with my poor English for hours to fined what I'm looking for. > > I found a very simple and not comprehensive tutorial for the pyWinAuto > > lib in t

RE: [Business apps for Windows] Good grid + calendar, etc.?

2008-06-01 Thread Ryan Ginstrom
> On Behalf Of Gilles Ganault > Is it hopeless, or did I overlook things? Are there other > solutions I should look at (FLTK, etc.)? For those of you > writing business apps in Python for Windows, how do things go > as far as GUI widgets are concerned? To do a bit of shameless plugging, I wrot

Re: Merging ordered lists

2008-06-01 Thread Taekyon
etal wrote: > Speed actually isn't a problem yet; it might matter some day, but for > now it's just an issue of conceptual aesthetics. Any suggestions? Looks as if set does it for you. -- Taekyon -- http://mail.python.org/mailman/listinfo/python-list

[Business apps for Windows] Good grid + calendar, etc.?

2008-06-01 Thread Gilles Ganault
Hello Since Python is such a productive language, I'd really like to be able to use it to write GUI apps for Windows, but business apps require rich widgets like (DB)grids, calendars, etc. The ones available in wxWidgets looked a bit too basic compared to what's available for eg. Delphi o

Re: Need Tutorial For the following lib

2008-06-01 Thread Larry Bates
Gandalf wrote: Hi scott, you couldn't be more wrong about my laziness. I straggle with my poor English for hours to fined what I'm looking for. I found a very simple and not comprehensive tutorial for the pyWinAuto lib in this address http://pywinauto.openqa.org/ but it only show how to do the ba

Re: method-wrapper?

2008-06-01 Thread David
> What is "method-wrapper"? Google turns up hardly any hits, same with > searching python.org. > It probably means that one object (A) contains another object (B). When you call certain methods on object A, those methods call methods in B, and return B's results to A's caller. >From that docstri

Ann: Pyparsing 1.5.0 released

2008-06-01 Thread Paul McGuire
I've just uploaded to SourceForge the latest update to pyparsing, version 1.5.0. This version includes a number of long-awaited features, so I thought it was time to bump the minor rev version. - parsing a complete string without having to add StringEnd() to the pyparsing grammar, by adding par

Re: SMS sending and receiving from website?

2008-06-01 Thread David
On Fri, May 30, 2008 at 11:08 PM, globalrev <[EMAIL PROTECTED]> wrote: > can i send and receive messages from a website using python? > > how would that work with costs? would the mobileowner pay both ways? > -- > http://mail.python.org/mailman/listinfo/python-list > I use smstools for this. Home

Re: SMS sending and receiving from website?

2008-06-01 Thread Benjamin Kaplan
On Fri, May 30, 2008 at 5:08 PM, globalrev <[EMAIL PROTECTED]> wrote: > can i send and receive messages from a website using python? > > how would that work with costs? would the mobileowner pay both ways? > -- > http://mail.python.org/mailman/listinfo/python-list > I believe that there is a way

Re: Merging ordered lists

2008-06-01 Thread MClaveau
Hi! Use set (union). Example: la=[2,1,3,5,4,6] lb=[2,8,6,4,12] #compact: print list(set(la).union(set(lb))) #detail: s1 = set(la) s2 = set(lb) s3 = s1.union(s2) print list(s3) @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Merging ordered lists

2008-06-01 Thread Peter Otten
Peter Otten wrote: > #untested Already found two major blunders :( # still untested import difflib def _merge(a, b): sm = difflib.SequenceMatcher(None, a, b) for op, a1, a2, b1, b2 in sm.get_opcodes(): if op == "insert": yield b[b1:b2] elif op == "replace":

Re: Merging ordered lists

2008-06-01 Thread M�ta-MCI (MVP)
Hi! Use set (union). Example: la=[2,1,3,5,4,6] lb=[2,8,6,4,12] #compact: print list(set(la).union(set(lb))) #detail: s1 = set(la) s2 = set(lb) s3 = s1.union(s2) print list(s3) @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting up and running with Python on a Mac

2008-06-01 Thread Tommy Nordgren
On 29 maj 2008, at 22.57, [EMAIL PROTECTED] wrote: I've just bought an iMac (OS X 10.5.2, will almost immediately jump to 10.5.3), and am looking to install Python on it, and to use it with There is no need to install Python. It's distributed with the system. XCode, Apple's IDE. Some

python's setuptools (eggs) vs ruby's gems survey/discussion

2008-06-01 Thread Alia Khouri
Can we open up the discussion here about how to improve setuptools which has become the de facto standard for distributing / installing python software. I've been playing around with ruby's gems which seems to be more more mature and usable. >From my perspective, the relative immaturity of setupt

Re: Merging ordered lists

2008-06-01 Thread Peter Otten
etal wrote: > Here's an algorithm question: How should I efficiently merge a > collection of mostly similar lists, with different lengths and > arbitrary contents, while eliminating duplicates and preserving order > as much as possible? > > My code: > > def merge_to_unique(sources): > """Mer

Re: The Importance of Terminology's Quality

2008-06-01 Thread szr
Peter Duniho wrote: > On Sat, 31 May 2008 23:27:35 -0700, szr <[EMAIL PROTECTED]> wrote: > >> [...] >>> But the subthread Lew commente don was about Perl and Unix. That is >>> clearly off topic. >> >> I agree with and understand what you are saying in general, but >> still, isn't it possible that w

Re: Merging ordered lists

2008-06-01 Thread Raymond Hettinger
On May 31, 10:00 pm, etal <[EMAIL PROTECTED]> wrote: > Here's an algorithm question: How should I efficiently merge a > collection of mostly similar lists, with different lengths and > arbitrary contents, while eliminating duplicates and preserving order > as much as possible? I would do it two s

Re: File browser in python gui

2008-06-01 Thread TheSaint
On 02:48, domenica 01 giugno 2008 TheSaint wrote: > I'm gonna back to study a little I'm facing tough time, I can't get clear by Trolltech's C++ examples. I'm a bit puzzled :), I'd like to remain with the QT widget set, but hard learning curve. Other simplified developing TK are giving different

Re: Bring object 'out of' Class?

2008-06-01 Thread Arnaud Delobelle
dave <[EMAIL PROTECTED]> writes: > Hello, > > I'm currently on the class section of my self-taught journey and have > a question about classes: is it possible to bring a object created > inside the class definitions outside the class so it can be accessed > in the interpreter? > > For example, ri