Re: [Tutor] __iter__ loops, partitioning list among children

2008-08-25 Thread Eric Abrahamsen
I do apologize for the large quantities of confusing description – articulating the problem here has helped me understand exactly what it is I'm after (though it hasn't improved my code!), and I've got a better grasp of the problem now than I did when I first asked. It isn't so much that I

Re: [Tutor] Why does the Hex builtin function in Python return a string ?

2008-08-25 Thread Kent Johnson
On Mon, Aug 25, 2008 at 8:45 PM, Py Hex <[EMAIL PROTECTED]> wrote: > When I run this: > type(hex(12)) > > > I get a string type back, i.e, '0xC' not 0xC > > On the other hand, if I use 0x with data, Python understands it is hex data > and not a string value. > e = 0xCD type(e) > >

Re: [Tutor] Why does the Hex builtin function in Python return a string ?

2008-08-25 Thread John Fouhy
2008/8/26 John Fouhy <[EMAIL PROTECTED]>: > The hex() function (and oct() too) provides you with a different > string representation from the default. If you want to change python > to display integers in hex instead of decimal by default, I can't help > you.. (well, maybe you could subclass int,

Re: [Tutor] Why does the Hex builtin function in Python return a string ?

2008-08-25 Thread John Fouhy
2008/8/26 Py Hex <[EMAIL PROTECTED]>: > When I run this: > type(hex(12)) > > > I get a string type back, i.e, '0xC' not 0xC > > On the other hand, if I use 0x with data, Python understands it is hex data > and not a string value. > e = 0xCD type(e) > > > Why does the Hex builtin f

[Tutor] Fwd: Why does the Hex builtin function in Python return a string ?

2008-08-25 Thread W W
Forgot to send to list... On Mon, Aug 25, 2008 at 7:45 PM, Py Hex <[EMAIL PROTECTED]> wrote: > When I run this: > > >>> type(hex(12)) > > > I get a string type back, i.e, '0xC' not 0xC > > On the other hand, if I use 0x with data, Python understands it is hex data > and not a string value. > > >

[Tutor] Why does the Hex builtin function in Python return a string ?

2008-08-25 Thread Py Hex
When I run this: >>> type(hex(12)) I get a string type back, i.e, '0xC' not 0xC On the other hand, if I use 0x with data, Python understands it is hex data and not a string value. >>> e = 0xCD >>> type(e) Why does the Hex builtin function in Python return a string ? How can I convert this

Re: [Tutor] pass argument into running program *outside* of program

2008-08-25 Thread Emile van Sebille
Ricardo Aráoz wrote: Emile van Sebille wrote: I've done this and it works well... one thing to watch out for though is snagging a file before it's completely written. Setting up a semaphore or pausing to allow the file write to complete once seeing the file fixes it adequately. If instead

Re: [Tutor] Python Docs (Was: Reformatting phone number)

2008-08-25 Thread Ricardo Aráoz
Kent Johnson wrote: On Fri, Aug 22, 2008 at 9:46 AM, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: What I find lacking in the docs are a link to a code example for every item and a "See Also" link to other related items. With some modules I can't make sense of the different bits and pieces till I se

Re: [Tutor] pass argument into running program *outside* of program

2008-08-25 Thread Ricardo Aráoz
Emile van Sebille wrote: Lie Ryan wrote: In a much simpler situation, even a communicating from a plain file could be enough. In the daemon's program folder, there'll be two files: input and output. You write to input to instruct the server and read the response from output. This model is in re

Re: [Tutor] test

2008-08-25 Thread Robert Berman
Nope. Kirk Bailey wrote: is my posting getting through? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] test

2008-08-25 Thread W W
yup On Mon, Aug 25, 2008 at 11:47 AM, Kirk Bailey <[EMAIL PROTECTED]>wrote: > is my posting getting through? > -- > > > Cheers! > -Kirk D Bailey > > THINK > +-+ > .*.| BOX | > ..*+-+ > *** THINK > ___

Re: [Tutor] editmypage

2008-08-25 Thread Kent Johnson
On Mon, Aug 25, 2008 at 12:18 PM, Kirk Bailey <[EMAIL PROTECTED]> wrote: > I wrote a password protected program to edit webpages via http. thiss iss in > 2 files, one serves the editing page, one saves the edited page and shows > the rssults. > http://www.freeholdmarketing.com/EditMyPage.py > http:

[Tutor] test

2008-08-25 Thread Kirk Bailey
is my posting getting through? -- Cheers! -Kirk D Bailey THINK +-+ .*.| BOX | ..*+-+ *** THINK ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/t

[Tutor] editmypage

2008-08-25 Thread Kirk Bailey
I wrote a password protected program to edit webpages via http. thiss iss in 2 files, one serves the editing page, one saves the edited page and shows the rssults. http://www.freeholdmarketing.com/EditMyPage.py http://www.freeholdmarketing.com/EditMyPage2.py This take a link on the page to edit

Re: [Tutor] __iter__ loops, partitioning list among children

2008-08-25 Thread Kent Johnson
I'm not following your code very well. I don't understand the relationship between the first loop and the iter_children() function. A couple of things that might help: - Django QuerySets can be qualified with additional tests, so you could have each of your month/week/etc classes have its own corr

Re: [Tutor] __iter__ loops, partitioning list among children

2008-08-25 Thread Eric Abrahamsen
Okay I think I'm onto something, more iterator-related stuff. If I can make self.events an iterator, then run a for loop on it, breaking out of the loop when the events' date attributes get too high. Then on the next run through, that same for loop should pick up where it left off, right? H

Re: [Tutor] Python open of c:\ path Problem

2008-08-25 Thread Lie Ryan
> Message: 7 > Date: Sun, 24 Aug 2008 00:21:45 +0100 > From: "Alan Gauld" <[EMAIL PROTECTED]> > Subject: Re: [Tutor] Python open of c:\ path Problem > To: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=origina

Re: [Tutor] Read active tab url from firefox

2008-08-25 Thread Alan Gauld
"xbmuncher" <[EMAIL PROTECTED]> wrote I want to make a program in python that knows the current url of the active tab in firefox. I want to be able to right click anywhere in my system, notepad, firefox..etc.. and be able to see an added menu option. Any pointers on doing this? This is impos