Hi All,
I'm pleased to announce the first release of xlutils. This is a small
collection of utilities that make use of both xlrd and xlwt to process
Microsoft Excel files.
The current utilities included are:
xlutils.margins
Tools for finding how much of an Excel file contains useful data.
On Nov 10, 10:13 am, Ronn <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I have a list:
> suffix = ["aĉ", "ad", "aĵ", "an", "ar"]
>
> and I'm trying to check a word to see if any of the suffixes exist in
> the list for example:
> if word in suffix:
> print "A suffix exist in your word"
>
> w
On Nov 10, 10:29 am, "Geon." <[EMAIL PROTECTED]> wrote:
> hi everyone!
>
> when i install pysqlite i meet bellow error. ( use easy_install and
> source code building same problem )
>
> ld: Can't find library for -lpython2.5
>
> what mean this message? and what i do?
>
> my system is hp-ux 11i v3. a
On Nov 9, 8:34 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Sun, 09 Nov 2008 23:33:30 +0100, Thomas Mlynarczyk
> <[EMAIL PROTECTED]> declaimed the following in
> comp.lang.python:
>
>
>
> > Of course. For the actual message I would use at least the line number.
> > Still, the offset could
>> Timeit suggests the single sort returning the real, imag tuples is
>> faster than two sorts each on one field, as you might expect since
>> many fewer calls to the key function are made.
Steve> Only half the number, of course. The advantage of the key
Steve> function is tha
On Nov 10, 1:13 pm, Ronn <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I have a list:
> suffix = ["aĉ", "ad", "aĵ", "an", "ar"]
>
> and I'm trying to check a word to see if any of the suffixes exist in
> the list for example:
> if word in suffix:
> print "A suffix exist in your word"
>
> wh
On 11월10일, 오전11시29분, "Geon." <[EMAIL PROTECTED]> wrote:
> hi everyone!
>
> when i install pysqlite i meet bellow error. ( use easy_install and
> source code building same problem )
>
> ld: Can't find library for -lpython2.5
>
> what mean this message? and what i do?
>
> my system is hp-ux 11i v3. a
On Sun, Nov 9, 2008 at 9:29 PM, Geon. <[EMAIL PROTECTED]> wrote:
> hi everyone!
>
> when i install pysqlite i meet bellow error. ( use easy_install and
> source code building same problem )
>
> ld: Can't find library for -lpython2.5
>
> what mean this message? and what i do?
>
> my system is hp-ux
Fuzzyman wrote:
> On Nov 9, 7:39 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
>>> Heh. Well it would, except the administrator user doesn't have a
>>> password (purely a VM) and this is unacceptable for runas. :-)
>> There is, unfortunately, no other way to install Python 2.6 on Vista.
>> So yo
hi everyone!
when i install pysqlite i meet bellow error. ( use easy_install and
source code building same problem )
ld: Can't find library for -lpython2.5
what mean this message? and what i do?
my system is hp-ux 11i v3. and python2.5 is installed.
ld command also avaliable.
please help for m
[EMAIL PROTECTED] wrote:
[...]
> Duncan> If you don't like the tuple then just do the two sorts separately:
>
> lst.sort(key=lambda x: x.imag)
> lst.sort(key=lambda x: x.real)
> ...
>
> I tried that. I could have sworn when I read through the output it hadn't
> retained
Hello all,
I have a list:
suffix = ["aĉ", "ad", "aĵ", "an", "ar"]
and I'm trying to check a word to see if any of the suffixes exist in
the list for example:
if word in suffix:
print "A suffix exist in your word"
when I run this it give me an error:
SyntaxError: Non-ASCII character
On Nov 8, 10:00 am, Iain <[EMAIL PROTECTED]> wrote:
> On Nov 7, 4:42 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED]
>
> central.gen.new_zealand> wrote:
> > In message
> > <[EMAIL PROTECTED]>, Iain
> > wrote:
>
> > > Can someone give me some pointers as to how I might create some sort
> > > of blocking
"News123" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi,
I was googling quite some time before finding the answer to my question:
'what are the names for the encodings supported by python?'
I found the answer at http://python.active-venture.com/lib/node127.html
Now my quest
In article <[EMAIL PROTECTED]>,
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> The "homogeneous vs. heterogeneous" discussion is not that much about
> type, but more about semantics of the individual values. If you
> represent (firstname, lastname, age), you use tuples - three different
> (and or
On Nov 9, 2008, at 7:00 PM, News123 wrote:
Hi,
I was googling quite some time before finding the answer to my
question:
'what are the names for the encodings supported by python?'
I found the answer at http://python.active-venture.com/lib/
node127.html
Now my question:
Can I find the
On Nov 10, 11:00 am, News123 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I was googling quite some time before finding the answer to my question:
> 'what are the names for the encodings supported by python?'
>
> I found the answer athttp://python.active-venture.com/lib/node127.html
>
> Now my question:
>
I was googling quite some time before finding the answer to my question:
'what are the names for the encodings supported by python?'
I found the answer at http://python.active-venture.com/lib/node127.html
Now my question:
Can I find the same info in the standard python doc or query python with
On Nov 9, 2008, at 4:42 PM, Steve Holden wrote:
Ed! Good to see you on c.l.py!
I usually only get around to reading the list when I'm having a
problem I can't figure out. .
Simply too busy most of the time.
a) Try using the subprocess module
b) Use *.pyw programs to ensure no c
Hi,
I was googling quite some time before finding the answer to my question:
'what are the names for the encodings supported by python?'
I found the answer at http://python.active-venture.com/lib/node127.html
Now my question:
Can I find the same info in the standard python doc or query python
On Nov 10, 9:33 am, Thomas Mlynarczyk <[EMAIL PROTECTED]>
wrote:
> John Machin schrieb:
>
> >>> dict.iter() will return its results in essentially random
> >>> order.
> > A list of somethings does seem indicated.
>
> On the other hand: If all my tokens are "mutually exclusive" then,
But they won't
[EMAIL PROTECTED] wrote:
Hi everyone,
I am using Python's re module to extract some data from html. The
following code never returns, and I was wondering if someone can
explain to me why. Is this a problem with my regexp (I tried really
hard to find it?)?
[snip] html/xml string
regexp = re.com
On 09.11.2008, Tino Wildenhain <[EMAIL PROTECTED]> wroted:
>>> I think that was part of the problem.. you asked if the wheel had
>>> already been invented, rather than tell us about the stones you have
>>> to haul up a mountain, and whether a wheel is what you need. It's
>>> difficult to answer y
My apologies, given that Google Groups messes up the formatting, the
regexp should read
regexp = re.compile("""(.*?).*?\s*(?:(.*?))?.*?(?:to ((?: )
+))*.*?.*?\s*.*?""", re.DOTALL)
--
http://mail.python.org/mailman/listinfo/python-list
Hi everyone,
I am using Python's re module to extract some data from html. The
following code never returns, and I was wondering if someone can
explain to me why. Is this a problem with my regexp (I tried really
hard to find it?)?
The string contains three records (list items in a html page). Not
On 08.11.2008, Piotr Chamera <[EMAIL PROTECTED]> wroted:
>> In a couple of weeks I'm starting a medium-size project (using a web
>> framework) involving a workflow implementation. Are you aware of any
>> open source workflow engines/libraries that I could base the project
>> on? Google returns
> Hmmm, I seem to have engaged in a bit of topic drift, for which I
> apologize. I was commenting specifically on the issue of lists holding
> heterogeneous types, not on heterogeneous types being sortable.
Still, I don't think this is a valid counter-example: I claim that the
data in the list
Ed Leafe wrote:
> I'm working on a wxPython app (well, a Dabo app, but it's basically
> the same thing) that presents the user with a selection of several
> wxPython apps that exist on their system. They choose one, and I want to
> then "launch" that app, as if they had typed "python myapp.py"
John Machin schrieb:
[...] You have TWO problems: (1) Reporting the error location as
(offset from the start of the file) instead of (line number, column
position) would get you an express induction into the User Interface
Hall of Shame.
Of course. For the actual message I would use at least
"Okko Willeboordse" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hello,
SocketServer.ThreadingTCPServer accepts connections (clients can
connect) before and after it's server_forever method is called,
see below for an example.
IMHO it should only accept connections while server
On 9 Nov 2008 19:08:35 GMT, Duncan Booth <[EMAIL PROTECTED]>
wrote:
> Phil Thompson wrote:
>
>>> Thay aren't claiming that Qt itself is governed by the GPL, what they
>>> are claiming is that the 'Qt Open Source License' permits you to use it
>>> for development of "Open Source software governed b
In article <[EMAIL PROTECTED]>,
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> One added value in Python 3.0 would be that they are sortable in a
> `list`. But seriously, your token example should work fine with
> Python 3.0 because the wish to sort tokens is a bit exotic IMHO.
Hmmm,
thanks guys.
cheers,
Stef
Terry Reedy wrote:
Stef Mientki wrote:
hello,
although this is not a real problem for me,
it was caused by a copying, instead of moving, a piece of code.
But I don't understand at all why the code below gives the error.
class derived_class, is defined twice,
the erro
Mlk day of service
.
.
.
***CLICK HERE
http://vids247.cn/Mlk-day-of-service-
*
.
.
.
.
.
.
.
.
.
.
.
.
Mlk day of service
--
http://mail.python.org/mailman/listinfo/python-list
Christina sturmer
.
.
.
***CLICK HERE
http://vids247.cn/Christina-sturmer
*
.
.
.
.
.
.
.
.
.
.
.
.
Christina sturmer
--
http://mail.python.org/mailman/listinfo/python-list
Talambuhay ninoy aquino
.
.
.
***CLICK HERE
http://vids247.cn/Talambuhay-ninoy-aquino-
*
.
.
.
.
.
.
.
.
.
.
.
.
Talambuhay ninoy aquino
--
http://mail.python.org/mailman/listinfo/python-list
Cramer meltdown
.
.
.
***CLICK HERE
http://vids247.cn/Cramer-meltdown
*
.
.
.
.
.
.
.
.
.
.
.
.
Cramer meltdown
--
http://mail.python.org/mailman/listinfo/python-list
Bigtitsatschool
.
.
.
***CLICK HERE
http://vids247.cn/Bigtitsatschool
*
.
.
.
.
.
.
.
.
.
.
.
.
Bigtitsatschool
--
http://mail.python.org/mailman/listinfo/python-list
Cupric wrote:
I have a python script that runs fine from the command line or from
within IDLE, but doesn't work through the Vista Task Scheduler.
The script downloads some csv files and then uses pywin32 to combine
the csv files into a single document. When I run it through the task
scheduler, i
On 9 Nov., 20:44, Fuzzyman <[EMAIL PROTECTED]> wrote:
> On Nov 9, 2:18 pm, Anton Vredegoor <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Thu, 30 Oct 2008 17:45:40 +0100
>
> > Gerhard Häring <[EMAIL PROTECTED]> wrote:
> > > psyco seems to just work on Linux with Python 2.6. So it is probably
> > > "only"
Greg Ewing wrote:
I'm creating a COM server in Python that will have one
main class, with methods that create and return instances
of other classes.
I've found that I need to use win32com.server.util.wrap
and unwrap on these objects when they pass over a COM
connection. This doesn't seem very co
Lawrence D'Oliveiro wrote:
In message <[EMAIL PROTECTED]>, Steve
Holden wrote:
Lawrence D'Oliveiro wrote:
In message
<[EMAIL PROTECTED]>,
Michele Simionato wrote:
On Nov 7, 4:38 pm, Tim Golden <[EMAIL PROTECTED]> wrote:
Seriously, though, although Python does indeed support multiple
inher
Shao wrote:
Dear All,
I am looking for a nitty-gritty Python Ajax script to fire off a
number of processing programmes, periodically checking their
operations, sending messages back to an HTML div form by sending back
the links of generated data files, to be downloaded by end users. I am
using .
On Sunday 09 November 2008 20:08, Duncan Booth wrote:
> So are the references to 'Qt Open Source License' on the website
> misleading?
It depends on whether you assume that there's a separate license by that
name. In practice, it's a placeholder for the licenses it's available under:
"The Open S
On 9 Nov., 17:49, Terry Reedy <[EMAIL PROTECTED]> wrote:
> I was asking the OP ;-)
Thank you for the discussion.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm using the module cwiid to conncet to a wiimote.
import cwiid
wiimote = cwiid.Wiimote()
This function is blocking:
It waits until it could sucessfully connect to a device or
until 20 seconds passed without sucessful connection.
As I wanted to do some things even if the wii-mote is not
co
I am trying to put up a queue (through a logging thread) so that all
worker threads can ask it to log messages. However, the problem I am
facing is that, well, the logging thread itself is running forever.
It does not know when it should exit. Any suggestion? None of the
worker threads knows for
Hello,
SocketServer.ThreadingTCPServer accepts connections (clients can
connect) before and after it's server_forever method is called,
see below for an example.
IMHO it should only accept connections while server_forever is
running.
Kind regards,
Okko
Example, both _socket.connect calls shoul
Fuzzyman:
> I've built a Windows installer if anyone is interested:
Thank you to both.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
It would be rally great if wingIDE would have integrated controls for
wxPython.This would be really great.
--
http://mail.python.org/mailman/listinfo/python-list
> It installs fine for 'just me', so no problem.
It installs for 'just me', but it doesn't work. Just try starting
IDLE, or import the socket module.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I wrote a small application connecting to an application and sending
commands to it.
Currently I'm using the methods
import dcop
client = dcop.DCOPClient()
client.registerAs(appname)
ama = dcopclient.rc = dcop.DCOPRef("amarok", "player")
controlling the app works now fine with for example
On Nov 9, 2:18 pm, Anton Vredegoor <[EMAIL PROTECTED]> wrote:
> On Thu, 30 Oct 2008 17:45:40 +0100
>
> Gerhard Häring <[EMAIL PROTECTED]> wrote:
> > psyco seems to just work on Linux with Python 2.6. So it is probably
> > "only" a matter of compiling it on Windows for Python 2.6.
>
> Yes. I compile
On Nov 9, 7:39 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > Heh. Well it would, except the administrator user doesn't have a
> > password (purely a VM) and this is unacceptable for runas. :-)
>
> There is, unfortunately, no other way to install Python 2.6 on Vista.
> So your choices are rea
On Nov 10, 1:39 am, Thomas Mlynarczyk <[EMAIL PROTECTED]>
wrote:
> John Machin schrieb:
>
> > Be consistent with your punctuation style. I'd suggest *not* having a
> > space after ( and before ), as in the previous line. Read
> >http://www.python.org/dev/peps/pep-0008/
>
> What were the reasons for
"Martin v. Löwis" <[EMAIL PROTECTED]> writes:
>> Even in 2.x it doesn't work (I think I posted this earlier but I'm not
>> sure anymore) as this example shows:
>>
>> 2 < 3j and 3j < True, but True < 2
>
> What specific value of x have you been trying? For x=4,5,6, I get
>
> py> 2 < 3j and 3j
> Heh. Well it would, except the administrator user doesn't have a
> password (purely a VM) and this is unacceptable for runas. :-)
There is, unfortunately, no other way to install Python 2.6 on Vista.
So your choices are really:
1. activate the Administrator account
2. disable UAC
3. go back to X
> Even in 2.x it doesn't work (I think I posted this earlier but I'm not
> sure anymore) as this example shows:
>
> 2 < 3j and 3j < True, but True < 2
What specific value of x have you been trying? For x=4,5,6, I get
py> 2 < 3j and 3j < True
Traceback (most recent call last):
File "", line
Phil Thompson wrote:
>> Thay aren't claiming that Qt itself is governed by the GPL, what they
>> are claiming is that the 'Qt Open Source License' permits you to use it
>> for development of "Open Source software governed by the GNU General
>> Public License versions 2 and 3". I believe they can m
"Martin v. Löwis" <[EMAIL PROTECTED]> writes:
>> def comp(x1, x2):
>>try:
>>if x1>return -1
>>else:
>>return 1
>>except TypeError:
>>if str(x1)>return -1
>>else:
>>return 1
>>
>
> Please correct me if I'm wron
Hallvard B Furuseth wrote:
> Terry Reedy writes:
>> If you want to duplicate 2.x behavior, which does *not* work for all
>> types...
>>
>> def py2key(item): return (str(type(item)), item)
>
> Nope.
> sorted((-1, 2, True, False)) == [-1, False, True, 2]
> sorted((-1, 2, True, False)
> In any case, would it be possible to add a cmp= function which did more
> or less what the current default cmp does now?
As somebody pointed out, it's possible to create a key= function that
provides arbitrary ordering: just return an object custom type whose
__lt__ never fails:
class AlwaysOrd
> def comp(x1, x2):
>try:
>if x1return -1
>else:
>return 1
>except TypeError:
>if str(x1)return -1
>else:
>return 1
>
Please correct me if I'm wrong, but I think this is not transitive. If
strings and ints are
On Nov 9, 6:23 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 9, 2008 at 4:14 PM, Fuzzyman <[EMAIL PROTECTED]> wrote:
> > Hello guys,
>
> > Not sure if this is a Windows question or a Python problem...
>
> > I'm trying to install Python 2.6 from the msi, on Windows Vista as an
> > ad
On Sun, Nov 9, 2008 at 4:14 PM, Fuzzyman <[EMAIL PROTECTED]> wrote:
> Hello guys,
>
> Not sure if this is a Windows question or a Python problem...
>
> I'm trying to install Python 2.6 from the msi, on Windows Vista as an
> administrative user with UAC on. If I try to install for all users
> then I
> Sure:
>
> if len(L1) == len(L2):
> return sorted(L1) == sorted(L2) # check whether two lists contain
> the same elements
> else:
> return False
>
> It doesn't really matter here what the result of the sorts actually is
> as long as the algorithm leads to the same result for all permuta
Terry Reedy <[EMAIL PROTECTED]> writes:
[...]
> A different version of what Arnaud D. said:
[...]
That was much clearer! I realise now that my explanation was an order
of magnitude too terse :)
--
Arnaud
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Duncan> If you don't like the tuple then just do the two sorts separately:
lst.sort(key=lambda x: x.imag)
lst.sort(key=lambda x: x.real)
...
I tried that. I could have sworn when I read through the output it hadn't
retained the order of the r
Hello guys,
Not sure if this is a Windows question or a Python problem...
I'm trying to install Python 2.6 from the msi, on Windows Vista as an
administrative user with UAC on. If I try to install for all users
then I am told I don't have privileges to do that... (No UAC prompt.)
The only other
>> Yes, key= lets you sort anything anyway you want.
>> >>> l=[1, '2', 3j]
>> >>> sorted(l, key = str)
>> [1, '2', 3j]
>
> The problem here is that str() is degenerate, i.e. a != b does not imply
> str(a) != str(b).
So why is this a problem? The sort algorithm is stable, so it gives a
determin
In article <[EMAIL PROTECTED]>,
Roy Smith <[EMAIL PROTECTED]> wrote:
>In article <[EMAIL PROTECTED]>,
> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>>attribution missing:
>>>
>>> Also, I thought that part of the python philosophy was to allow any
>>> sort of object in a list, and to allow the s
Stef Mientki wrote:
hello,
although this is not a real problem for me,
it was caused by a copying, instead of moving, a piece of code.
But I don't understand at all why the code below gives the error.
class derived_class, is defined twice,
the error is cuase by the second instance creation "test
r3bol wrote:
Hi, sorry to post this, but I've had a really hard time finding how to
do it.
Q.
How can I break up a value in a list to a list of individual items
(preferably without importing any modules)?
Like...
['12345'] (string)
to
[1, 2, 3, 4, 5] [numbers]
You did not specify what you want
Ben Finney wrote:
Duncan Booth <[EMAIL PROTECTED]> writes:
In effect this means that if you want to develop any commercial
software with Qt you have to buy the license in advance (even if all
you want is to knock together some proof-of-concept) and you are
also permanently locked out from incl
Roy Smith <[EMAIL PROTECTED]> writes:
> I spend too much time in C++ pleading with the compiler to allow me to do
> what I want. I come to Python to get away from all that type bondage.
>
> As another example, consider a list of items being juggled:
>
> [RubberChicken(), ChainSaw(), Canteloupe()
On Sun, 09 Nov 2008 12:15:42 -0500, Kevin Walzer <[EMAIL PROTECTED]>
wrote:
> Phil Thompson wrote:
>
>>
>> The only "additional" restrictions are those imposed by the *commercial*
>> license. As I said before, those restrictions are intended to discourage
>> commercial developers from avoiding pa
Phil Thompson wrote:
The only "additional" restrictions are those imposed by the *commercial*
license. As I said before, those restrictions are intended to discourage
commercial developers from avoiding paying license costs during their
development phase.
Is this interpretation of Qt's lice
Terry Reedy writes:
> If you want to duplicate 2.x behavior, which does *not* work for all
> types...
>
> def py2key(item): return (str(type(item)), item)
Nope.
sorted((-1, 2, True, False)) == [-1, False, True, 2]
sorted((-1, 2, True, False), key=py2key) == [False, True, -1, 2]
Mig
Chris Rebert wrote:
On Sat, Nov 8, 2008 at 9:16 PM, John Smith <[EMAIL PROTECTED]> wrote:
Hi,
I coded a python script that lets me parse a csv file into html code with a
certain format, but I would like to replace every "<" and ">" character that
appears within each column entry of the csv file
Joe Strout wrote:
On Nov 8, 2008, at 2:38 PM, Terry Reedy wrote:
So if you then insist that Python uses "call by object",
you're actually saying it uses call by value!
Both Joe and you seem to be engaging in the following bit of sophistry:
"In order for code A to call code B, some informatio
Steven D'Aprano writes:
> How often do you care about equality ignoring order for lists containing
> arbitrary, heterogeneous types?
Arbitrary, I never have. Different types of my choice, a few times.
I was only interested in there being some _sort_ order (and the same in
different runs of the p
greg wrote:
No. Passing q by value means that the value of the expression 'q',
whatever that is in the language concerned, gets assigned to the
local variable 'p', whatever *that* means in the language concerned.
In other words, as I acknowledged in my other post, one can say that all
calling
Kay Schluehr wrote:
On 9 Nov., 05:04, Terry Reedy <[EMAIL PROTECTED]> wrote:
Have you written any Python code where you really wanted the old,
unpredictable behavior?
Sure:
I was asking the OP ;-)
if len(L1) == len(L2):
return sorted(L1) == sorted(L2) # check whether two lists conta
On 9 Nov 2008 14:40:22 GMT, Duncan Booth <[EMAIL PROTECTED]>
wrote:
> Ben Finney wrote:
>
>>> It is a novel interpretation of the GPL. Qt Software have every
>>> right to impose this sort of condition, but it makes me want to
>>> avoid them.
>>
>> No, they have no such right to interpret the GPL t
On Sun, 09 Nov 2008 10:45:31 -0500, Roy Smith wrote:
> In article <[EMAIL PROTECTED]>,
> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> Roy Smith schrieb:
>>> In article <[EMAIL PROTECTED]>,
>>> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>>>
>> When I wrote "uniform" I meant objects of the
On Sun, 09 Nov 2008 10:45:31 -0500, Roy Smith wrote:
> In article <[EMAIL PROTECTED]>,
> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> Roy Smith schrieb:
>>> In article <[EMAIL PROTECTED]>,
>>> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>>>
>> When I wrote "uniform" I meant objects of the
On Sun, 09 Nov 2008 10:45:31 -0500, Roy Smith wrote:
> In article <[EMAIL PROTECTED]>,
> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> Roy Smith schrieb:
>>> In article <[EMAIL PROTECTED]>,
>>> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>>>
>> When I wrote "uniform" I meant objects of the
On Sun, 09 Nov 2008 10:45:31 -0500, Roy Smith wrote:
> In article <[EMAIL PROTECTED]>,
> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> Roy Smith schrieb:
>>> In article <[EMAIL PROTECTED]>,
>>> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>>>
>> When I wrote "uniform" I meant objects of the
In article <[EMAIL PROTECTED]>,
Duncan Booth <[EMAIL PROTECTED]> wrote:
> Roy Smith wrote:
>
> > In 3.0, can you still order types? In 2.x, you can do:
> >
> t1 = type(1)
> t2 = type(1j)
> t1 < t2
> > False
> >
> > If this still works in 3.0, then you can easily do something like
In article <[EMAIL PROTECTED]>,
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Roy Smith schrieb:
> > In article <[EMAIL PROTECTED]>,
> > "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> >
> >>> Also, I thought that part of the python philosophy was to allow any
> >>> sort of object in a list,
Duncan Booth wrote:
> Roy Smith wrote:
>
>> In 3.0, can you still order types? In 2.x, you can do:
>>
> t1 = type(1)
> t2 = type(1j)
> t1 < t2
>> False
>>
>> If this still works in 3.0, then you can easily do something like:
>>
>> def total_order(o1, o2):
>>"Compare any two object
[EMAIL PROTECTED] schrieb:
The thread on sorting in Python 3 got me to thinking. How could I sort a
list of complex numbers using key?
>>> lst = [random.random()+random.random()*1j for i in range(10)]
>>> lst
[(0.32672251849959244+0.41428983433288791j),
(0.35238056484609881+0.92758
Roy Smith schrieb:
In article <[EMAIL PROTECTED]>,
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
Also, I thought that part of the python philosophy was to allow any
sort of object in a list, and to allow the same methods to work with
whatever was in list.
Not really. When the usual argument ab
>> Is there a way to do this using just the key arg, no extra data
>> structures?
Duncan> Is a tuple an extra data structure?
lst.sort(key=lambda x: (x.real,x.imag))
pprint.pprint(lst)
Duncan> [2.6001j,
Duncan> 20j,
Duncan> (1+2.73j),
D
On Sunday 09 November 2008 13:45, Ben Finney wrote:
> Duncan Booth <[EMAIL PROTECTED]> writes:
>
>> Mr.SpOOn wrote:
>> > What's the problem with qt licence?
>>
>> "You must purchase a Qt Commercial License from Qt Software or from
>> one of its authorized resellers before you start developing
>>
Arnaud Delobelle schrieb:
Adding to John's comments, I wouldn't have source as a member of the
Lexer object but as an argument of the tokenise() method (which I would
make public). The tokenise method would return what you currently call
self.result. So it would be used like this.
mylexer =
[EMAIL PROTECTED] wrote:
> I can sort by the real parts just fine:
>
> >>> lst.sort(key=lambda x: x.real)
> >>> pprint.pprint(lst)
> [2.6001j,
> 20j,
> (1+2.73j),
> (1+21j),
> (2+2.8603j),
> (2+22j),
> (3+2.9902j),
>
thanks :) and so many different ways!
--
http://mail.python.org/mailman/listinfo/python-list
Ben Finney wrote:
>> It is a novel interpretation of the GPL. Qt Software have every
>> right to impose this sort of condition, but it makes me want to
>> avoid them.
>
> No, they have no such right to interpret the GPL this way; it would be
> entirely incompatible with the GPL since it would be a
Roy Smith wrote:
> In 3.0, can you still order types? In 2.x, you can do:
>
t1 = type(1)
t2 = type(1j)
t1 < t2
> False
>
> If this still works in 3.0, then you can easily do something like:
>
> def total_order(o1, o2):
>"Compare any two objects of arbitrary types"
>try:
>
1 - 100 of 136 matches
Mail list logo