It seems like it would be clear and mostly backwards compatible if the
+ operator on any iterables created a new iterable that iterated
throught first its left operand and then its right, in the style of
itertools.chain. This would allow summation of generator expressions,
among other things, to h
Hi.
>>> import time, calendar, datetime
>>> n= 1133893540.874922
>>> datetime.datetime.fromtimestamp(n)
datetime.datetime(2005, 12, 6, 10, 25, 40, 874922)
>>> lt= _
>>> datetime.datetime.utcfromtimestamp(n)
datetime.datetime(2005, 12, 6, 18, 25, 40, 874922)
>>> gmt= _
So it's easy to create datet
On Sun, 17 Jul 2005 11:05:06 +0100, Stephen Illingworth <[EMAIL PROTECTED]>
wrote:
> John Reese wrote:
>> Morning. I've been running into an error message pertaining to SSL
>> that I don't understand, and I was hoping someone had some insight.
>> Gmail pro
Morning. I've been running into an error message pertaining to SSL
that I don't understand, and I was hoping someone had some insight.
Gmail provides POP access over SSL on port 587, so I tried to use
poplib.POP_SSL, with the following results:
%python
Python 2.4.1 (#1, May 16 2005, 15:19:29)
[G
On Fri, 17 Jun 2005 16:40:56 -0600, <[EMAIL PROTECTED]> wrote:
> John Reese wrote:
>> I now do:
>>
>> if isinstance(x, list):
>>
>> It is my understanding that this is what people do nowadays.
>
> I wouldn't go that far. I don't have
Why hello there ha ha.
I have got in the habit of testing the types of variables with
isinstance and the builtin type names instead of using the types
module, as was the style back around Python 2.1. That is, rather than
if type(x) == types.ListType:
I now do:
if isinstance(x, list):
It
You know how you can specify that stderr, stdin, stdout should be
unbuffered by running python with the -u switch? Is there any way I
can have the same affect in code by doing something to the sys.std*
variables?
--
http://mail.python.org/mailman/listinfo/python-list
def uselessHash(filename):
fp= open(filename)
hash= 0
for line in fp:
hash ^= hash(line.strip())
fp.close() # do I need this or is fp closed by ref count?
return hash
Consider the function above. Do I need the fp.close(), or will the
file be closed automatically when fp goes out
On Wed, 20 Apr 2005 23:06:51 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote:
> John Reese wrote:
>> Is there a memory or heap profiler for python programs? So that, for
>> example, if a program was bloating over time I could see how many of
>> each object there we
Good afternoon, ha ha ha!
Is there a memory or heap profiler for python programs? So that, for
example, if a program was bloating over time I could see how many of
each object there were and maybe even where the references were?
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 20 Jan 2005 23:48:34 -0800, Tim Roberts <[EMAIL PROTECTED]> wrote:
> John Reese <[EMAIL PROTECTED]> wrote:
>>
>>Mozilla, Firefox, Thunderbird, and so forth use this awful format
>>called MORK to store all kinds of things: which messages you've read
Mozilla, Firefox, Thunderbird, and so forth use this awful format
called MORK to store all kinds of things: which messages you've read
in a newsgroup, headers and indexes into the mbox file of messages in
a mail folder, and address books. It's documented to some extent
here:
http://www.mozilla.org
On 03 Jan 2005 18:27:52 +, John J. Lee <[EMAIL PROTECTED]> wrote:
> Jonas Galvez <[EMAIL PROTECTED]> writes:
>
>> Christopher J. wrote:
>> > I tried this, but it didn't work:
>> > conn.request("GET", "/somepage.html", None,
>> > {"AUTHORIZATION": "Basic username:password"})
> [...]
>> import r
On 03 Jan 2005 18:11:06 +, John J. Lee <[EMAIL PROTECTED]> wrote:
> (Re ternary operator: Everybody who read this list at certain times in
> the past is painfully aware of that fact, and of precisely why it's
> not quite true, and of all the syntax alternatives for real ternary
> conditionals t
In comp.lang.python, [I] wrote:
> Hello there. I've run into some missing functionality with HTTP Digest
> authentication in the 2.3 library and I was wondering if I'm just
> missing something.
>
> Missing functionality the first: urllib2
>
> 1a. You can add "handlers" to your opener indicating
Hello there. I've run into some missing functionality with HTTP Digest
authentication in the 2.3 library and I was wondering if I'm just
missing something.
Missing functionality the first: urllib2
1a. You can add "handlers" to your opener indicating that you want to
use HTTP Digest auth.
16 matches
Mail list logo