Re: [Tutor] help with sorted()

2008-08-19 Thread Emile van Sebille
Rick Pasotto wrote: I have a dictionary that looks like: d = {k:[v1,[v2,v3,v4]]} v1,v2,v3,v4 are integers. I want to print the dictionary sorted by v1, high to low. sorted(d,operator.itemgetter(0),reverse=True) You need to pass a compare function in... try for ii in sorted(d,lambda ii,jj: c

Re: [Tutor] how to read Messages sorted by thread in thunderbird

2008-08-19 Thread OmerT
Using gmail and messages are sorted into threads by subject automatically. (I did have to switch back from digest to regular mode..) HTH. On Tue, Aug 19, 2008 at 8:01 PM, Lie Ryan <[EMAIL PROTECTED]> wrote: > >> >> Message: 6 >> Date: Tue, 19 Aug 2008 02:48:39 -0700 >> From: "Timothy Grant" <[EMA

Re: [Tutor] how to read Messages sorted by thread in thunderbird

2008-08-19 Thread Lie Ryan
> > Message: 6 > Date: Tue, 19 Aug 2008 02:48:39 -0700 > From: "Timothy Grant" <[EMAIL PROTECTED]> > Subject: Re: [Tutor] how to read Messages sorted by thread in > thunderbird > To: scsoce <[EMAIL PROTECTED]> > Cc: tutor@python.org > Message-ID: > <[EMAIL PROTECTED]> > Content-Ty

[Tutor] SOLVED: [ FTP question (slightly OT)]

2008-08-19 Thread Paul Schewietzek
Just found the solution, I didn't realize that ftplib has 'passive mode' as the standard - so I ended up with never actually trying to use 'active mode' Thanks nonetheless :) Am Dienstag, den 19.08.2008, 15:16 +0200 schrieb Paul Schewietzek: > Hello everyone, > > > > I put together the fo

[Tutor] FTP question (slightly OT)

2008-08-19 Thread Paul Schewietzek
Hello everyone, I put together the following, most of it is from different howtos on the web. #!/usr/bin/env python # -*- coding: utf-8 -*- def gettext(ftp, filename, outfile=None): if outfile is None: outfile = sys.stdout ftp.retrlines("RETR %s" % filename, la

Re: [Tutor] How to use urllib2.https_open with SSL support in Windows XP for python 2.5.2]

2008-08-19 Thread Kent Johnson
On Mon, Aug 18, 2008 at 9:36 PM, xbmuncher <[EMAIL PROTECTED]> wrote: > I tried it just like both of you suggested and sent a req object straight to > urlopen. Here is my code: > import urllib2 > url = 'https://url.com' > headers = { > 'User-Agent' : 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'

Re: [Tutor] how to read Messages sorted by thread in thunderbird

2008-08-19 Thread Timothy Grant
On Tue, Aug 19, 2008 at 1:38 AM, scsoce <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >> >> Send Tutor mailing list submissions to >>tutor@python.org >> >> To subscribe or unsubscribe via the World Wide Web, visit >>http://mail.python.org/mailman/listinfo/tutor >> or, via em

Re: [Tutor] how to read Messages sorted by thread in thunderbird

2008-08-19 Thread Alan Gauld
"scsoce" <[EMAIL PROTECTED]> wrote many threads is clustered and unfriendly to me. My question is there a way to read messages sorted by thread ( just like in web version http://mail.python.org/pipermail/ ) but in thunderbird or other mail applications, or other way better ? I mainly

Re: [Tutor] How to use urllib2.https_open with SSL support in Windows XP for python 2.5.2

2008-08-19 Thread arsyed
On Mon, Aug 18, 2008 at 9:26 PM, xbmuncher <[EMAIL PROTECTED]> wrote: > > > On Mon, Aug 18, 2008 at 8:44 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: >> >> On Mon, Aug 18, 2008 at 12:40 PM, xbmuncher <[EMAIL PROTECTED]> wrote: >> > I wanted to use the urllib2.https_open() but it said the module did

[Tutor] how to read Messages sorted by thread in thunderbird

2008-08-19 Thread scsoce
[EMAIL PROTECTED] wrote: Send Tutor mailing list submissions to tutor@python.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.python.org/mailman/listinfo/tutor or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can

Re: [Tutor] How to use urllib2.https_open with SSL support in Windows XP for python 2.5.2]

2008-08-19 Thread arsyed
On Mon, Aug 18, 2008 at 9:36 PM, xbmuncher <[EMAIL PROTECTED]> wrote: > I tried it just like both of you suggested and sent a req object straight to > urlopen. Here is my code: > import urllib2 > url = 'https://url.com' > headers = { > 'User-Agent' : 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'