Re: [Tutor] A Million Sevens

2006-11-18 Thread Alan Gauld
"Chris Hengge" <[EMAIL PROTECTED]> wrote > Not that it changes your reply, but just for my own sanity: > int('7' * 10 ** 6) <- does this not just type-cast a char into an > int? Chris, I suspect you may come from a C background? Type *conversion* in Python is very differentb from type *casting*

[Tutor] exception not raised XP file ?

2006-11-18 Thread Dave S
Due to some sloppy programming on a commercial app :) I have a problem. I have some directories on an XP machine, I need to know which of these directories (*.cab_tmp) contains a file that that is being accessed by another XP program. I set it up so that a known file (SIZES.DBF) in a known dir

[Tutor] A question about: Adding seconds to datetime object

2006-11-18 Thread Asrarahmed Kadri
Hi , I have a question: Is it possible to add seconds to a datetime object and get the result as a new datetime object. I mean when we keep adding, for example, 3600 seconds, the date will get changed after 24 iterations. Is it possible to carry out such an operation ? TIA. Best Regards, Asrar

Re: [Tutor] A question about: Adding seconds to datetime object

2006-11-18 Thread Kent Johnson
Asrarahmed Kadri wrote: > Hi , > > > I have a question: > > Is it possible to add seconds to a datetime object and get the result as > a new datetime object. I mean when we keep adding, for example, 3600 > seconds, the date will get changed after 24 iterations. Is it possible > to carry ou

Re: [Tutor] OT: Vim was: free IDE for Python?

2006-11-18 Thread Chris Lasher
On 11/17/06, Mike Hansen <[EMAIL PROTECTED]> wrote: > > Here's what I'm doing. Not sure if it's that helpful to you. > > I use the mini-buffer explorer plug-in and the taglist plugin. > > set smartindent > > " shuts off the annoying "#" comment in smartindent to jump to col 1 > inoremap # X# > > au

Re: [Tutor] exception not raised XP file ?

2006-11-18 Thread Roel Schroeven
Dave S schreef: > Due to some sloppy programming on a commercial app :) I have a problem. > > I have some directories on an XP machine, I need to know which of these > directories (*.cab_tmp) contains a file that that is being accessed by > another XP program. To me the easiest solution seems t

Re: [Tutor] exception not raised XP file ?

2006-11-18 Thread Dave S
On Saturday 18 November 2006 16:08, Roel Schroeven wrote: > Dave S schreef: > > Due to some sloppy programming on a commercial app :) I have a problem. > > > > I have some directories on an XP machine, I need to know which of these > > directories (*.cab_tmp) contains a file that that is being acce

Re: [Tutor] A question about: Adding seconds to datetime object

2006-11-18 Thread Asrarahmed Kadri
Thanks. It means, you take a datetime object and then using a timedelta object, perform the addition, the language takes care of changing the date if the time crosses midnight. WOW... this makes life a lot easier.. Have a brilliant evening. Best Regards, Asrarahmed Kadri On 11/18/06, Kent John

[Tutor] (no subject)

2006-11-18 Thread Kent D. Grimsley
I am new subscriber to python and now, I'm getting e-mail from all sorts of people having to do with questions I did not ask. Please take steps to remove my address from that list and take steps to help me get e-mail only from people answering my questions. I hope this is not an unreasonable

Re: [Tutor] (no subject)

2006-11-18 Thread Luke Paireepinart
Kent D. Grimsley wrote: > I am new subscriber to python and now, I'm getting e-mail from all > sorts of people having to do with questions I did not ask. Please > take steps to remove my address from that list > and take steps to help me get e-mail only from people > answering my questions. I

Re: [Tutor] (no subject)

2006-11-18 Thread Luke Paireepinart
Mr. Grimsley, I hope you don't mind if I forward this reply to the mailing list at large. I believe that some other people on the list can give you some guidance on your transition from FORTRAN to Python, and make it as enjoyable as possible. I, however, know nothing of FORTRAN, so I leave it up t

Re: [Tutor] A Million Sevens

2006-11-18 Thread Chris Hengge
That must be part of Pythons shiny ability of dynamic data types? Must be a messy operation to change data-types like that.. I think I'll just do my best to work with the right data-types the whole time ;D On 11/18/06, Alan Gauld <[EMAIL PROTECTED]> wrote: "Chris Hengge" <[EMAIL PROTECTED]> wro

Re: [Tutor] exception not raised XP file ?

2006-11-18 Thread Roel Schroeven
Dave S schreef: > Is it just me - I seem to run into a lot of weird behaviour in windows (but > then I am a Linux Junky :) It's not just you. I knew Windows long before I started to know and learn Linux, and before that I knew MS-DOS. But still I have a better understanding of the concepts, phi

Re: [Tutor] os.popen, xp

2006-11-18 Thread Luke Paireepinart
Coen van der Kamp wrote: > Hello, > I've got a problem with the following code: > > import os, sys, string > mycolors = os.popen("coloryze --monochromatic --total=6 &").read().rstrip() > print mycolors > > This works fine on OS X, but when i tried it on XP the only result was > an empty string. Wh

[Tutor] os.popen, xp

2006-11-18 Thread Coen van der Kamp
Hello, I've got a problem with the following code: import os, sys, string mycolors = os.popen("coloryze --monochromatic --total=6 &").read().rstrip() print mycolors This works fine on OS X, but when i tried it on XP the only result was an empty string. When I run coloryze from the promt the retu

[Tutor] Re A question about: Adding seconds to datetime object

2006-11-18 Thread Danny Yoo
> Is it possible to add seconds to a datetime object and get the result as > a new datetime object. I mean when we keep adding, for example, 3600 > seconds, the date will get changed after 24 iterations. Is it possible > to carry out such an operation ? Hi Asrarahmed, I want to add that you c

[Tutor] Changing mailing list options

2006-11-18 Thread Danny Yoo
> I am new subscriber to python and now, I'm getting e-mail from all sorts > of people having to do with questions I did not ask. Please take steps > to remove my address from that list and take steps to help me get e-mail > only from people answering my questions. I hope this is not an > unr