How do I get a slice of a string held in a tuple?

2007-04-08 Thread Lorenzo Thurman
I have tuple which hold a string in tup[0]. I want to get a slice of that string. I thought I would do something like: tup[0][start:end] But this fails. How do I go about it? I googled this and found a couple of references, but no solution. TIA -- http://mail.python.org/mailman/listinfo/python-l

Re: Mail not setting timestamp

2007-04-07 Thread Lorenzo Thurman
Gabriel Genellina wrote: > Lorenzo Thurman wrote: >> Gabriel Genellina wrote: >>> Lorenzo Thurman wrote: >>> >>>> I'm using the Mimewriter and mimetools modules to create html messages. >>>> They work OK, except that when the messages are rec

Re: Mail not setting timestamp

2007-04-07 Thread Lorenzo Thurman
Gabriel Genellina wrote: > Lorenzo Thurman wrote: > >> I'm using the Mimewriter and mimetools modules to create html messages. >> They work OK, except that when the messages are received, they always >> have the timestamp of 12/31/1969. I've looked through both p

Mail not setting timestamp

2007-04-06 Thread Lorenzo Thurman
I'm using the Mimewriter and mimetools modules to create html messages. They work OK, except that when the messages are received, they always have the timestamp of 12/31/1969. I've looked through both packages and can't find anything that would allow me to manually set it. Can someone help me o

Re: NEWBIE: Script help needed

2006-11-05 Thread Lorenzo Thurman
Thanks for the reply, but I know there is something wrong with the command, I'm just not sure how to troubleshoot it. Anyway, I can execute all of the commands from the command line, but only 3 fails when run from within the script. I'll take a look at the link. Nick Vatamaniuc wrote: > If the

Re: Aggregate funuctions broken in MySQLdb?

2006-05-15 Thread Lorenzo Thurman
Thanks, that was my problem. Can you point me to some documentation on MySQLdb? I've been googling to get answers and that obviously has not been working. In article <[EMAIL PROTECTED]>, "Wade Leftwich" <[EMAIL PROTECTED]> wrote: > Works fine for me, and I certainly hope MySQLdb is ready fo

NEWBIE: Tokenize command output

2006-05-11 Thread Lorenzo Thurman
This is what I have so far: // #!/usr/bin/python import os cmd = 'ntpq -p' output = os.popen(cmd).read() // The output is saved in the variable 'output'. What I need to do next is select the line from that output that starts with the '*' remote refid st t when poll reach