Re: Multiple versions of Python coexisting in the same OS

2010-07-24 Thread Steven D'Aprano
On Sat, 24 Jul 2010 22:03:48 -0700, Chris Rebert wrote: >> Are the .py and .pyc extensions the only ones which are associated with >> Python or are there others, for a normal Python installation in Windows >> ? > > There's also .pyw Also .pyo .py = Python source code, usually associated with c

Re: Socket performance

2010-07-24 Thread John Nagle
On 7/23/2010 5:06 PM, Navkirat Singh wrote: Hey Everyone, I had a question, programming sockets, what are the things that would degrade performance and what steps could help in a performance boost? I would also appreciate being pointed to some formal documentation or article. 1. When writ

Re: Multiple versions of Python coexisting in the same OS

2010-07-24 Thread Chris Rebert
On Sat, Jul 24, 2010 at 7:40 PM, Edward Diener wrote: > On 7/24/2010 6:25 AM, Mark Lawrence wrote: >> On 24/07/2010 04:17, Edward Diener wrote: >>> Are there any documents about multiple versionsof Python coexisting in >>> the same OS ( Windows in my case ) and what pitfalls to look out for ? I >>

Re: Multiple versions of Python coexisting in the same OS

2010-07-24 Thread Edward Diener
On 7/24/2010 6:25 AM, Mark Lawrence wrote: On 24/07/2010 04:17, Edward Diener wrote: Are there any documents about multiple versionsof Python coexisting in the same OS ( Windows in my case ) and what pitfalls to look out for ? I have already run into a number of them. I installed Python 2.7 and

Re: Multiple versions of Python coexisting in the same OS

2010-07-24 Thread Edward Diener
On 7/24/2010 6:25 AM, Mark Lawrence wrote: On 24/07/2010 04:17, Edward Diener wrote: Are there any documents about multiple versionsof Python coexisting in the same OS ( Windows in my case ) and what pitfalls to look out for ? I have already run into a number of them. I installed Python 2.7 and

Re: non-blocking IO EAGAIN on write

2010-07-24 Thread Kushal Kumaran
- Original message - > In article , >  Kushal Kumaran wrote: > > > In general, after select has told you a descriptor is ready, the > > first write after that should always succeed. > > > > Consider, for example, a write on a TCP connection.  You are sitting in > a select(), when the ot

Re: Builtn super() function. How to use it with multiple inheritance? And why should I use it at all?

2010-07-24 Thread Steven D'Aprano
On Sun, 25 Jul 2010 13:58:00 +1200, Gregory Ewing wrote: > Lacrima wrote: > >> But what if SuperClass1 is from third party library? > > If it hasn't been designed for super(), then you can't use super() with > it. > > super() only works when *every* class in the hierarchy has been designed > wi

numpy installation

2010-07-24 Thread Jia Hu
Hello: I tried to install numpy 1.4.1 from source under ubuntu following instruction at http://docs.scipy.org/doc/numpy/user/install.html I type "" python setup.py build –help-fcompiler "" and it says gnu95 is found. Then I run ""python setup.py build –fcompiler=gnu95"". There is error. Does any

Re: Socket performance

2010-07-24 Thread Navkirat Singh
On 25-Jul-2010, at 6:45 AM, Lawrence D'Oliveiro wrote: > In message > , Navkirat Singh wrote: > >> I had a question, programming sockets, what are the things that would >> degrade performance and what steps could help in a performance boost? > > Remember the old saying, “premature optimization

Re: Builtn super() function. How to use it with multiple inheritance? And why should I use it at all?

2010-07-24 Thread Gregory Ewing
Lacrima wrote: But what if SuperClass1 is from third party library? If it hasn't been designed for super(), then you can't use super() with it. super() only works when *every* class in the hierarchy has been designed with it in mind. -- Greg -- http://mail.python.org/mailman/listinfo/python-

Re: Socket performance

2010-07-24 Thread Lawrence D'Oliveiro
In message , Navkirat Singh wrote: > I had a question, programming sockets, what are the things that would > degrade performance and what steps could help in a performance boost? Remember the old saying, “premature optimization is the root of all evil”. Have you actually got some code working pr

pyqt Error with qtdesigner button groups

2010-07-24 Thread Gelonida
Hi, I have have a layout with qt designer, which contains radio buttons. Now I want to add three buttons into a button group. doing this manually works fine with manually I mean adding a few lines in my widget class. example: bg = self.buttongroup = Qg.QButtonGroup() bg.addButton(self.rad

Re: Multiprocessing zombie processes

2010-07-24 Thread Navkirat Singh
On 25-Jul-2010, at 5:25 AM, Cameron Simpson wrote: > [ Please don't top post. Post below so that things read like a > conversation. (And trim excess quoted junk.) It doesn't take long and > makes things a lot easier for your readers. ] > > On 25Jul2010 04:41, Navkirat Singh wrote: > | On 25-J

Re: A portable LISP interpreter that includes all the major list-processing functions is described. A complete, annotated listing of the program's code, written in PASCAL, is included.

2010-07-24 Thread geremy condra
On Sat, Jul 24, 2010 at 3:43 PM, Emmy Noether wrote: > On Jul 23, 9:27 pm, TheFlyingDutchman wrote: >> On Jul 23, 12:06 pm, Emmy Noether wrote: >> >> >> >> > Title   Portable LISP interpreter >> > Creator/Author  Cox, L.A. Jr. ; Taylor, W.P. >> > Publication Date        1978 May 31 >> > OSTI Ide

Re: Multiprocessing zombie processes

2010-07-24 Thread Cameron Simpson
[ Please don't top post. Post below so that things read like a conversation. (And trim excess quoted junk.) It doesn't take long and makes things a lot easier for your readers. ] On 25Jul2010 04:41, Navkirat Singh wrote: | On 25-Jul-2010, at 4:37 AM, Navkirat Singh wrote: | > I have been medd

Re: Multiprocessing zombie processes

2010-07-24 Thread Thomas Jollans
On 07/25/2010 01:43 AM, Navkirat Singh wrote: > I want to kill Zombiesso first I have to create them...simple law of > nature You can't kill a zombie. That's why we call them zombies, as opposed to, say, daemons. > > > On 25-Jul-2010, at 5:08 AM, Chris Rebert wrote: > >> On Sat, Jul 2

Re: why is this group being spammed?

2010-07-24 Thread John Bokma
"be.krul" writes: > On Jul 17, 10:01 pm, "be.krul" wrote: >> why is this group being spammed? > > What I was asking is why not moderate the group. this is the only > Python group I could find.. Controlling spam starts by you! Report it. And certainly don't reply to spam by qouting the entire (r

Re: Multiprocessing zombie processes

2010-07-24 Thread Navkirat Singh
I want to kill Zombiesso first I have to create them...simple law of nature On 25-Jul-2010, at 5:08 AM, Chris Rebert wrote: > On Sat, Jul 24, 2010 at 4:11 PM, Navkirat Singh wrote: >> OK I wanted zombie processes > >> Now lets see how I can handle them. > > "Paging Dr. Frankenstein.

Re: Multiprocessing zombie processes

2010-07-24 Thread Chris Rebert
On Sat, Jul 24, 2010 at 4:11 PM, Navkirat Singh wrote: > OK I wanted zombie processes > Now lets see how I can handle them. "Paging Dr. Frankenstein. Dr. Frankenstein to the lab. Paging Dr. Frankenstein." Cheers, Chris -- Most people try to /avoid/ making zombies. -- http://mail.python.org/mai

Re: Are those features still the same?

2010-07-24 Thread Terry Reedy
On 7/24/2010 8:45 AM, francogrex wrote: Hi, I'm not a Python programmer but I'm interested in it and I found this table from Norvig that dates for some years (I re-posted it temporarily on my site below to take it out of context a little). I'm not interested in any comparisons only in the Python

Re: Multiprocessing zombie processes

2010-07-24 Thread Navkirat Singh
OK I wanted zombie processes and have been able to regenerate them with multiprocessing. Now lets see how I can handle them. Nav On 25-Jul-2010, at 4:37 AM, Navkirat Singh wrote: > Hi, > > I have been meddling around with forking and multiprocessing. Now both of > them spawn new processes fro

Multiprocessing zombie processes

2010-07-24 Thread Navkirat Singh
Hi, I have been meddling around with forking and multiprocessing. Now both of them spawn new processes from parent (atleast from what I have understood). I have been able to reproduce a zombie state in a fork with: import os,time print('before fork',os.getpid()) pid = os.fork() if pid:

Re: why is this group being spammed?

2010-07-24 Thread Mark Lawrence
On 24/07/2010 20:28, Jia Hu wrote: I subscribe for this mailing list at http://mail.python.org/mailman/listinfo/python-list I read through Thunderbird on Windows direct to gmane.comp.python.general. I'm no expert on such things, but assume that they are simply better [or less profitable :)]

Re: A portable LISP interpreter that includes all the major list-processing functions is described. A complete, annotated listing of the program's code, written in PASCAL, is included.

2010-07-24 Thread Emmy Noether
On Jul 23, 9:27 pm, TheFlyingDutchman wrote: > On Jul 23, 12:06 pm, Emmy Noether wrote: > > > > > Title   Portable LISP interpreter > > Creator/Author  Cox, L.A. Jr. ; Taylor, W.P. > > Publication Date        1978 May 31 > > OSTI Identifier OSTI ID: 7017786 > > Report Number(s)        UCRL-52417

Re: A portable LISP interpreter that includes all the major list-processing functions is described. A complete, annotated listing of the program's code, written in PASCAL, is included.

2010-07-24 Thread Emmy Noether
On Jul 23, 9:27 pm, TheFlyingDutchman wrote: > On Jul 23, 12:06 pm, Emmy Noether wrote: > > > > > Title   Portable LISP interpreter > > Creator/Author  Cox, L.A. Jr. ; Taylor, W.P. > > Publication Date        1978 May 31 > > OSTI Identifier OSTI ID: 7017786 > > Report Number(s)        UCRL-52417

Re: Unicode error

2010-07-24 Thread John Machin
dirknbr gmail.com> writes: > I have kind of developped this but obviously it's not nice, any better > ideas? > > try: > text=texts[i] > text=text.encode('latin-1') > text=text.encode('utf-8') > except: > text=' ' As Steven has poin

Re: Where is the man page of python library

2010-07-24 Thread Chris Jewell
rantingrick writes: > On Jul 23, 9:49 am, Steven D'Aprano In the land of the blind, the one eyed man is king! ;-) "... And across the way, in the country of the witless, the half-wit is king." Richard Mitchell (a/k/a The Undeground Grammarian.) http://www.sourcetext.com/grammarian/graves-of-a

Re: 'as' keyword - when/how to use it

2010-07-24 Thread Dummey
On Jul 24, 3:44 am, Steven D'Aprano wrote: > On Fri, 23 Jul 2010 23:33:55 -0700, Dummey wrote: > > I am having the hardest time trying to find documentation on proper use > > of the 'as' keyword (aside from . I initially thought that I would be > > allowed to do something such as: > > > import sha

Re: why is this group being spammed?

2010-07-24 Thread Jia Hu
I subscribe for this mailing list at http://mail.python.org/mailman/listinfo/python-list On Sat, Jul 24, 2010 at 3:22 PM, Jia Hu wrote: > Hi, can I subscribe this by gmail? > > On Sat, Jul 24, 2010 at 3:16 PM, Mark Lawrence wrote: > >> On 24/07/2010 18:01, Dennis Lee Bieber wrote: >> >>> On Sat,

Re: understanding the mro (long)

2010-07-24 Thread Carl Banks
On Jul 23, 7:42 pm, Rolando Espinoza La Fuente wrote: > TL;DR: if you want to stay sane, don't inherit two classes that share > same inheritance graph [snip rest] If you want to stay sane, don't inherit from ANY class unless A. you own it, or B. it's explicitly documented as supporting inherita

Re: why is this group being spammed?

2010-07-24 Thread Jia Hu
Hi, can I subscribe this by gmail? On Sat, Jul 24, 2010 at 3:16 PM, Mark Lawrence wrote: > On 24/07/2010 18:01, Dennis Lee Bieber wrote: > >> On Sat, 24 Jul 2010 07:32:30 -0700 (PDT), "be.krul" >> declaimed the following in gmane.comp.python.general: >> >> But maybe owner of this group do no care

Re: why is this group being spammed?

2010-07-24 Thread Mark Lawrence
On 24/07/2010 18:01, Dennis Lee Bieber wrote: On Sat, 24 Jul 2010 07:32:30 -0700 (PDT), "be.krul" declaimed the following in gmane.comp.python.general: But maybe owner of this group do no care in that case we *all* get spammed! There is NO OWNER of comp.lang.python; and turning a comp

Re: Library versions

2010-07-24 Thread Carl Banks
On Jul 24, 8:56 am, Peo wrote: > Hi, > > I'm writing a library for doing sysadmin tasks at my workplace. These > kind of > scripts have a tendency to live for decades and I want to make sure > that I don't break anything when I'm updating the library. > > My current plan is to call the library som

Re: non-blocking IO EAGAIN on write

2010-07-24 Thread John Nagle
On 7/23/2010 1:45 AM, Thomas Guettler wrote: Hi, I use non-blocking io to check for timeouts. Sometimes I get EAGAIN (Resource temporarily unavailable) on write(). My working code looks like this. But I am unsure how many bytes have been written to the pipe if I get an EAGAIN IOError. At

Re: Checking that 2 pdf are identical (md5 a solution?)

2010-07-24 Thread rlevesque
On Jul 24, 1:34 pm, Peter Otten <__pete...@web.de> wrote: > rlevesque wrote: > > Unfortunately there is an other pair of values that does not match and > > it is not obvious to me how to exclude it (as is done with the " / > > CreationDate" pair). > > and the pdf document is created using reportLab

Re: Checking that 2 pdf are identical (md5 a solution?)

2010-07-24 Thread Peter Otten
rlevesque wrote: > Unfortunately there is an other pair of values that does not match and > it is not obvious to me how to exclude it (as is done with the " / > CreationDate" pair). > and the pdf document is created using reportLab. I dug into the reportlab source and in reportlab/rl_config.py

Re: Checking that 2 pdf are identical (md5 a solution?)

2010-07-24 Thread rlevesque
On Jul 24, 11:50 am, Peter Otten <__pete...@web.de> wrote: > rlevesque wrote: > > Hi > > > I am working on a program that generates various pdf files in the / > > results folder. > > > "scenario1.pdf"  results from scenario1 > > "scenario2.pdf" results from scenario2 > > etc > > > Once I am happy w

Re: why is this group being spammed?

2010-07-24 Thread nero janick
Brian, would you like to volunteer? On Sat, Jul 24, 2010 at 8:59 AM, Brian J Mingus wrote: > > > On Sat, Jul 17, 2010 at 11:01 PM, be.krul wrote: > >> why is this group being spammed? >> -- >> http://mail.python.org/mailman/listinfo/python-list >> > > Here's a few of theories: > > 1) This isn't

Library versions

2010-07-24 Thread Peo
Hi, I'm writing a library for doing sysadmin tasks at my workplace. These kind of scripts have a tendency to live for decades and I want to make sure that I don't break anything when I'm updating the library. My current plan is to call the library something like 'foo1' and import it into scripts

Re: why is this group being spammed?

2010-07-24 Thread Brian J Mingus
On Sat, Jul 17, 2010 at 11:01 PM, be.krul wrote: > why is this group being spammed? > -- > http://mail.python.org/mailman/listinfo/python-list > Here's a few of theories: 1) This isn't a strong enough community to warrant a group of people who moderate the list and make sure spam doesn't come t

Re: Checking that 2 pdf are identical (md5 a solution?)

2010-07-24 Thread Peter Otten
rlevesque wrote: > Hi > > I am working on a program that generates various pdf files in the / > results folder. > > "scenario1.pdf" results from scenario1 > "scenario2.pdf" results from scenario2 > etc > > Once I am happy with scenario1.pdf and scenario2.pdf files, I would > like to save them

Re: Checking that 2 pdf are identical (md5 a solution?)

2010-07-24 Thread Peter Chant
rlevesque wrote: > Is there a way to compare 2 pdf files generated at different time but > identical in every other respect and validate by program that the > files are identical (for all practical purposes)? I wonder, do the PDFs have a timestamp within them from when they are created? That wo

Re: why is this group being spammed?

2010-07-24 Thread be.krul
On Jul 24, 7:39 am, Thomas Jollans wrote: > On 07/24/2010 04:20 PM, be.krul wrote: > > > On Jul 17, 10:09 pm, Chris Rebert wrote: > >> On Sat, Jul 17, 2010 at 10:01 PM, be.krul wrote: > >>> why is this group being spammed? > > >> Because that's what happens in unmoderated USENET newsgroups. > >

Checking that 2 pdf are identical (md5 a solution?)

2010-07-24 Thread rlevesque
Hi I am working on a program that generates various pdf files in the / results folder. "scenario1.pdf" results from scenario1 "scenario2.pdf" results from scenario2 etc Once I am happy with scenario1.pdf and scenario2.pdf files, I would like to save them in the /check folder. Now after having

Re: Jesus in the Glorious Qur'an ------ The True Message of Jesus Christ

2010-07-24 Thread be.krul
On Jul 23, 3:14 pm, nais-saudi wrote: > Jesus in the Glorious Qur'an -- The True Message of Jesus Christ > > The Qur’an tells us a lot of wonderful things about Jesus. As a > result, believers in the Qur’an love Jesus, honour him, and believe in > him. In fact, no Muslim can be a Muslim unless

Re: why is this group being spammed?

2010-07-24 Thread Thomas Jollans
On 07/24/2010 04:20 PM, be.krul wrote: > On Jul 17, 10:09 pm, Chris Rebert wrote: >> On Sat, Jul 17, 2010 at 10:01 PM, be.krul wrote: >>> why is this group being spammed? >> >> Because that's what happens in unmoderated USENET newsgroups. >> >> Cheers, >> Chris > > I thought this group can be mo

Re: why is this group being spammed?

2010-07-24 Thread be.krul
On Jul 17, 10:01 pm, "be.krul" wrote: > why is this group being spammed? What I was asking is why not moderate the group. this is the only Python group I could find.. But maybe owner of this group do no care in that case we *all* get spammed! -- http://mail.python.org/mailman/listinfo/python-lis

Re: why is this group being spammed?

2010-07-24 Thread be.krul
On Jul 17, 10:57 pm, "Alf P. Steinbach /Usenet" wrote: > * be.krul, on 18.07.2010 07:01: > > > why is this group being spammed? > > It depends a little on what you're asking, e.g. technical versus motivation. > > But I'll answer about something you probably didn't mean to ask, namely what > human

Re: why is this group being spammed?

2010-07-24 Thread be.krul
On Jul 17, 10:24 pm, Ben Finney wrote: > "be.krul" writes: > > why is this group being spammed? > > What kind of answer are you looking for? Are you asking about the > motives of spammers, or the technical explanation for how the spam > arrives, or something else? > > -- >  \                   “T

Re: why is this group being spammed?

2010-07-24 Thread be.krul
On Jul 17, 10:09 pm, Chris Rebert wrote: > On Sat, Jul 17, 2010 at 10:01 PM, be.krul wrote: > > why is this group being spammed? > > Because that's what happens in unmoderated USENET newsgroups. > > Cheers, > Chris I thought this group can be moderated, but turns out this is USENET Group.. -- h

Re: why is this group being spammed?

2010-07-24 Thread be.krul
On Jul 17, 10:40 pm, Stephen Hansen wrote: > On 7/17/10 10:01 PM, be.krul wrote: > > > why is this group being spammed? > > Because while God created the Internet, the Devil twisted it by creating > spammers. > > What do you expect? Adam just didn't pay enough attention when Eve made > him a waldo

Re: Are those features still the same?

2010-07-24 Thread Thomas Jollans
On 07/24/2010 03:48 PM, Brian Quinlan wrote: > > On 24 Jul 2010, at 23:19, Thomas Jollans wrote: >>> "Support heterogeneous lists" ==> "Yes (array)" >> >> This is nonsense, and has always been. >> Python lists (not arrays) have always been heterogeneous. They store >> objects and don't care about

Re: Are those features still the same?

2010-07-24 Thread Peter Otten
Thomas Jollans wrote: >> "Support heterogeneous lists" ==> "Yes (array)" > > This is nonsense, and has always been. I think you are misunderstanding that statement. Python's list stores its items in a continuous chunk of memory, a layout that is called array in common CS terminology as opposed

Re: Are those features still the same?

2010-07-24 Thread Brian Quinlan
On 24 Jul 2010, at 23:19, Thomas Jollans wrote: "Support heterogeneous lists" ==> "Yes (array)" This is nonsense, and has always been. Python lists (not arrays) have always been heterogeneous. They store objects and don't care about the type. Python arrays (from the array module) are homogeneo

Re: Are those features still the same?

2010-07-24 Thread Thomas Jollans
On 07/24/2010 02:45 PM, francogrex wrote: > Hi, I'm not a Python programmer but I'm > interested in it and I found this table from > Norvig that dates for some years (I re-posted > it temporarily on my site below to take it out > of context a little). I'm not interested in > any comparisons on

Re: Are those features still the same?

2010-07-24 Thread Peter Otten
francogrex wrote: > Hi, I'm not a Python programmer but I'm > interested in it and I found this table from > Norvig that dates for some years (I re-posted > it temporarily on my site below to take it out > of context a little). I'm not interested in > any comparisons only in the Python features (

Re: Are those features still the same?

2010-07-24 Thread Steven D'Aprano
On Sat, 24 Jul 2010 14:45:52 +0200, francogrex wrote: > Hi, I'm not a Python programmer but I'm interested in it and I found > this table from Norvig that dates for some years (I re-posted it > temporarily on my site below to take it out of context a little). I'm > not interested in any comparison

Are those features still the same?

2010-07-24 Thread francogrex
Hi, I'm not a Python programmer but I'm interested in it and I found this table from Norvig that dates for some years (I re-posted it temporarily on my site below to take it out of context a little). I'm not interested in any comparisons only in the Python features ( last column), can someone

Re: non-blocking IO EAGAIN on write

2010-07-24 Thread Roy Smith
In article , Kushal Kumaran wrote: > In general, after select has told you a descriptor is ready, the > first write after that should always succeed. I used to think that too. Over the last few years, I've been maintaining a large hunk of cross-platform C++ code which makes heavy use of sel

Re: time between now and the next 2:30 am?

2010-07-24 Thread Jim
On Jul 23, 8:52 pm, MRAB wrote: > > dt_twothirty=dt_localtime.replace(hour=settings.UPDATE_TIME_HOURS,minute=se > > ttings.UPDATE_TIME_MINS,second=0,microsecond=0) > > You're changing the time of day, but not the date. You might want to add > a day to the shutdown time if it's earlier than the cu

Re: Builtn super() function. How to use it with multiple inheritance? And why should I use it at all?

2010-07-24 Thread Lacrima
On Jul 24, 11:20 am, Raymond Hettinger wrote: > On Jul 24, 12:47 am, Lacrima wrote: > > > > > Hi! > > > I have two super classes: > > > class SuperClass1(object): > >     def __init__(self, word): > >         print word > > > class SuperClass2(object): > >     def __init__(self, word, word2): > >

Re: 'as' keyword - when/how to use it

2010-07-24 Thread Steven D'Aprano
On Fri, 23 Jul 2010 23:33:55 -0700, Dummey wrote: > I am having the hardest time trying to find documentation on proper use > of the 'as' keyword (aside from . I initially thought that I would be > allowed to do something such as: > > import shared.util as util > > The as statement seems to be c

Re: Multiple versions of Python coexisting in the same OS

2010-07-24 Thread Mark Lawrence
On 24/07/2010 04:17, Edward Diener wrote: Are there any documents about multiple versionsof Python coexisting in the same OS ( Windows in my case ) and what pitfalls to look out for ? I have already run into a number of them. I installed Python 2.7 and 3.1.2 into completely folders, but immediate

Re: C interpreter in Lisp/scheme/python

2010-07-24 Thread francogrex
In article , gneun...@comcast.net says... >I don't think it's accurate to say that [some] experts really "scorn" >newbies, but I do agree that newbies are occasionally mistreated. > >One thing newbies have to realize is that on Usenet you are quite >likely to be talking to people who were there

Re: 'as' keyword - when/how to use it

2010-07-24 Thread Terry Reedy
On 7/24/2010 2:33 AM, Dummey wrote: I am having the hardest time trying to find documentation on proper use of the 'as' keyword (aside from . I initially thought that I would be allowed to do something such as: import shared.util as util The as statement seems to be causing a lot of ''module' o

Re: Builtn super() function. How to use it with multiple inheritance? And why should I use it at all?

2010-07-24 Thread Raymond Hettinger
On Jul 24, 12:47 am, Lacrima wrote: > Hi! > > I have two super classes: > > class SuperClass1(object): >     def __init__(self, word): >         print word > > class SuperClass2(object): >     def __init__(self, word, word2): >         print word, word2 > > Also I have subclass of these classes: >

Builtn super() function. How to use it with multiple inheritance? And why should I use it at all?

2010-07-24 Thread Lacrima
Hi! I have two super classes: class SuperClass1(object): def __init__(self, word): print word class SuperClass2(object): def __init__(self, word, word2): print word, word2 Also I have subclass of these classes: class SubClass(SuperClass1, SuperClass2): def __init__(

Re: time between now and the next 2:30 am?

2010-07-24 Thread John Nagle
On 7/23/2010 10:01 AM, Jim wrote: How can I calculate how much time is between now and the next 2:30 am? Naturally I want the system to worry about leap years, etc. Thanks, Jim DAYSECS = 24*60*60 GOALSECS = (2*60 + 30)*60 now = (GOALSECS + DAYSECS - (int(time.time()) % DAYSECS)) % DA