Re: [Tutor] Support for datetime module

2008-09-08 Thread Johan Geldenhuys
] Support for datetime module > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Kent Johnson > Sent: Saturday, September 06, 2008 7:08 AM > To: [EMAIL PROTECTED] > Cc: tutor@python.org > Subject: Re: [Tutor] Support for dat

Re: [Tutor] Support for datetime module

2008-09-08 Thread Hansen, Mike
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Kent Johnson > Sent: Saturday, September 06, 2008 7:08 AM > To: [EMAIL PROTECTED] > Cc: tutor@python.org > Subject: Re: [Tutor] Support for datetime module > >

Re: [Tutor] Support for datetime module

2008-09-07 Thread Kent Johnson
On Sun, Sep 7, 2008 at 3:48 PM, Johan Geldenhuys <[EMAIL PROTECTED]> wrote: > I can get the time up to the closest second with the time module, but not to > the millisecond. > When I use time.strftime, I don't know how many milliseconds are left over > to use them. OK. I guess you can use time.str

Re: [Tutor] Support for datetime module

2008-09-07 Thread Johan Geldenhuys
Sent: Sunday, 7 September 2008 21:04 PM To: [EMAIL PROTECTED] Cc: tutor@python.org Subject: Re: [Tutor] Support for datetime module On Sun, Sep 7, 2008 at 6:17 AM, Johan Geldenhuys <[EMAIL PROTECTED]> wrote: > Thanks Kent, > > Let me explain what I need it for. > > I have a systemUp

Re: [Tutor] Support for datetime module

2008-09-07 Thread Kent Johnson
On Sun, Sep 7, 2008 at 6:17 AM, Johan Geldenhuys <[EMAIL PROTECTED]> wrote: > Thanks Kent, > > Let me explain what I need it for. > > I have a systemUpTime is seconds that I got from a SNMP agent. > > I want to work out when the system uptime began and want to put that in ISO > format time to the m

Re: [Tutor] Support for datetime module

2008-09-07 Thread Johan Geldenhuys
dule? Any suggestion would be greatly appreciated. Thanks Johan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kent Johnson Sent: Saturday, 6 September 2008 23:08 PM To: [EMAIL PROTECTED] Cc: tutor@python.org Subject: Re: [Tutor] Support for datetime module On

Re: [Tutor] Support for datetime module

2008-09-06 Thread Kent Johnson
On Sat, Sep 6, 2008 at 2:42 AM, Johan Geldenhuys <[EMAIL PROTECTED]> wrote: > Hi all, > > I have want to use the datetime module on a system with ver 2.2.3 installed. > I know it's very old, but that's what I have to deal with and can't upgrade. > So please don't suggest that. > > As you know datet

[Tutor] Support for datetime module

2008-09-06 Thread Johan Geldenhuys
Hi all, I have want to use the datetime module on a system with ver 2.2.3 installed. I know it's very old, but that's what I have to deal with and can't upgrade. So please don't suggest that. As you know datetime was available from version 2.3. I want to know where can I get the datetim

Re: [Tutor] Tutor support request.

2008-03-27 Thread Dick Moores
At 03:15 AM 3/27/2008, you wrote: Hi There: I am Olrik. 17 year old student that is practicing IT. I recently began learning Python and it's going quite fine. I'm following a tutorial at http://www.freenetpages.co.uk/hp/alan.gauld/ I just finished the branching tab to the left. And i'm about to

Re: [Tutor] Tutor support request.

2008-03-27 Thread bhaaluu
Hello Olrik, You can post your questions to this list and have access to many tutors. Generally speaking, if you'll post a code snippet with your question, it makes replying with a helpful answer much easier. Happy Programming! -- b h a a l u u at g m a i l dot c o m "You assist an evil system m

[Tutor] Tutor support request.

2008-03-27 Thread Olrik Lenstra
Hi There: I am Olrik. 17 year old student that is practicing IT. I recently began learning Python and it's going quite fine. I'm following a tutorial at http://www.freenetpages.co.uk/hp/alan.gauld/ I just finished the branching tab to the left. And i'm about to start Modules & Functions. However,

Re: [Tutor] Support

2005-04-09 Thread Kent Johnson
Alberto Troiano wrote: Hey dudes This code worked fine The one you gave me worked as well but when I wanteed to store it in the database it says that the packet was too large Whit this code it doesn't complain but now I don't know how to retrieve the image I retrieve it like this: db=MySQLdb.c

Re: [Tutor] Support

2005-04-09 Thread Alberto Troiano
machine that has the database and I forgot to copy the error :/) the fields in MySQL version 4 are Cod_Imagen int(4) auto_increment primary key, data longblob) Thanks in advanced Alberto  >From: Kent Johnson <[EMAIL PROTECTED]> >CC: tutor@python.org >Subject: Re: [Tutor] Support >Da

Re: [Tutor] Support

2005-04-08 Thread Kent Johnson
Alberto Troiano wrote: Thanks Apparently it worked but one question do What kind of data is the return of the function tostring() It's a string Can i put it in a blob type of a databaseor maybe in a longtext?? I would try longtext. Kent ___ Tutor

Re: [Tutor] Support

2005-04-08 Thread Alberto Troiano
thon.org >Subject: Re: [Tutor] Support >Date: Fri, 08 Apr 2005 11:59:24 -0400 > >Alberto Troiano wrote: >>I tried the code below but the image gets messed up: >> >>import Image >> >>im=Image.open("auto.jpg") >> >>im.show() ###This is t

Re: [Tutor] Support

2005-04-08 Thread Kent Johnson
Alberto Troiano wrote: I tried the code below but the image gets messed up: import Image im=Image.open("auto.jpg") im.show() ###This is to show the image so you can see it m=im.tostring() ima=Image.fromstring("RGB",im.size,m)###I tried also with F,RGBA and L mode instead of RGB maybe ima=Image.fro

Re: [Tutor] Support

2005-04-08 Thread Alberto Troiano
tead of RGB ima.show() Thanks in advanced Alberto>From: Brian van den Broek <[EMAIL PROTECTED]> >To: Alberto Troiano <[EMAIL PROTECTED]> >CC: tutor@python.org >Subject: Re: [Tutor] Support >Date: Fri, 08 Apr 2005 11:03:39 -0400 > >Alberto Troiano said unto the world upon 2

Re: [Tutor] Support

2005-04-08 Thread Brian van den Broek
Alberto Troiano said unto the world upon 2005-04-08 10:35: I am trying to make an application with Python 2.3.4, PIL 1.1.5 and I want to convert an image file to binary so I can store it in a MySQL database and then retrieve it and show it from binary to Image again so I can show the image Please h

[Tutor] Support

2005-04-08 Thread Alberto Troiano
I am trying to make an application with Python 2.3.4, PIL 1.1.5 and I want to convert an image file to binary so I can store it in a MySQL database and then retrieve it and show it from binary to Image again so I can show the image Please help Thanks Alberto ___