Re: httplib incredibly slow :-(

2009-08-12 Thread i3dmaster
On Aug 12, 9:37 am, Chris Withers wrote: > David Stanek wrote: > > I tried to reproduce this, but I could not. Could you paste in the > > output of your script? > > Not sure how that'll help, but sure: > > 2009-08-11 21:27:59.153000 > request: 0:00:00.109000 > response: 0:00:00.109000 > read: 0:24

Re: conditional install/distribution

2008-09-12 Thread i3dmaster
On Sep 11, 11:07 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > i3dmasterschrieb: > > > Is there a feature in distutils or easy_install to specify what > > version of python that the target package can be installed? For > > example, if a package has a module that only needed if the python > >

conditional install/distribution

2008-09-11 Thread i3dmaster
Is there a feature in distutils or easy_install to specify what version of python that the target package can be installed? For example, if a package has a module that only needed if the python version < 2.6, is there a way to specifiy that in setup.py or easy_install cfg file so that when installi

Re: Very basic, sorting a list ???

2007-11-28 Thread i3dmaster
On Nov 28, 4:22 pm, stef mientki <[EMAIL PROTECTED]> wrote: > hello, > > I'm trying to sort a list, using the same list at the commandline works, > but in a program it doesn't. > > Here is the code > print 'xx1',type(ordered_list) > print 'xx2',ordered_list > print 'xx3',ordered_list.so

Re: python safe scripting

2007-11-21 Thread i3dmaster
On Nov 21, 12:44 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > 2007/11/21, Vladimir Rusinov <[EMAIL PROTECTED]>: > > > Hello! > > > In one my project (it's logfile manager) I want to implement 'smart' > > configuration files, e.g. > > > logfile("/var/log/messages") > > if (size() > 10*1024*1024

Re: Simple python iteration question

2007-08-14 Thread i3dmaster
or use its builtin enumerate function: for i, j in enumerate(list): print i, j --Jim On Aug 14, 2007, at 9:26 AM, [EMAIL PROTECTED] wrote: > On Aug 14, 10:22 am, Bryan <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I just started with python, and have a for loop question >> >> In c++ (or a number

Re: Timing a python program run

2007-07-08 Thread i3dmaster
simplest way is just put a timer on start and another on the end, then calc the elapse. You can also take a look timeit module too which provides similar but more powerful functions... -Jim On Jul 7, 2007, at 12:21 PM, David wrote: > Hi, > > In matlab, I'd calculate the time for a script nam

Re: what is wrong with that r"\"

2007-07-06 Thread i3dmaster
Then you can use other chars as the delimiter, [EMAIL PROTECTED]@b@ or r!a!b!, etc... The import thing is so long as the interpreter doesn't get confused on the data and the delimiter. sed also allows for arbitrary delimiters too as long as you maintain the integrity of the original meanin

Re: converting datetime object in UTC to local time

2007-07-06 Thread i3dmaster
How about subclass datetime.tzinfo? That way you can use asttimezone to transfer utc to localtime. It requires an aware object though not naive. A bit more coding, but a lot less converting... Jim On Jul 3, 5:16 pm, Matt <[EMAIL PROTECTED]> wrote: > Hi all, > > So a lot of digging on doing this a

Re: Is there a way to hook into module destruction?

2007-06-16 Thread i3dmaster
On Jun 16, 11:03 pm, Gerald Kaszuba <[EMAIL PROTECTED]> wrote: > On Jun 17, 6:16 am, Neal Becker <[EMAIL PROTECTED]> wrote: > > > Code at global scope in a module is run at module construction (init). Is > > it possible to hook into module destruction (unloading)? > > Try the __del__ method. > > S

Re: unittest for threading function always failed...

2007-05-18 Thread i3dmaster
On May 18, 4:13 pm, i3dmaster <[EMAIL PROTECTED]> wrote: > I am having a little difficulty to figure out why this unittest for a > Thread subclass always fails... > > # unittest code: > > class SPThreadUnitTest(unittest.TestCase): > > def testgetresult(self): &g

unittest for threading function always failed...

2007-05-18 Thread i3dmaster
I am having a little difficulty to figure out why this unittest for a Thread subclass always fails... # unittest code: class SPThreadUnitTest(unittest.TestCase): def testgetresult(self): from random import randint self.i = randint(1,10) def p(n): return n self.t = spthread.SPT

Re: Execute commands from file

2007-05-17 Thread i3dmaster
On May 17, 3:02 am, Douglas Woodrow <[EMAIL PROTECTED]> wrote: > On Thu, 17 May 2007 00:30:23, i3dmaster <[EMAIL PROTECTED]> wrote > > >f = open(file,'rb') > >for i in f: > >exec i > > Why are you opening the file in binary mode? >

Re: Execute commands from file

2007-05-17 Thread i3dmaster
On May 16, 1:05 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Martin Blume wrote: > > "tmp123" schrieb > > >> We have very big files with python commands > >> (more or less, 50 commands each file). > > >> It is possible to execute them command by command, > > > inp = open(cmd_file) > > for line

Re: Universal Feed Parser issue

2007-04-11 Thread i3dmaster
On Apr 11, 12:01 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 11 Apr 2007 14:07:15 -0300, i3dmaster <[EMAIL PROTECTED]> > escribió: > > > Hmm... well I don't know if I made my question clear then or you might > > have misread it?...

Re: Universal Feed Parser issue

2007-04-11 Thread i3dmaster
On Apr 11, 12:06 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 11 Apr 2007 01:51:13 -0300, i3dmaster <[EMAIL PROTECTED]> > escribió: > > > > > On Apr 10, 6:45 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: >

Re: Universal Feed Parser issue

2007-04-11 Thread i3dmaster
On Apr 11, 12:06 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 11 Apr 2007 01:51:13 -0300, i3dmaster <[EMAIL PROTECTED]> > escribió: > > > > > On Apr 10, 6:45 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: >

Re: Universal Feed Parser issue

2007-04-10 Thread i3dmaster
On Apr 10, 6:45 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 10 Apr 2007 14:58:42 -0300, i3dmaster <[EMAIL PROTECTED]> > escribió: > > > I have a sample Atom feed like this: > > > > > ... > > > > > > &

Universal Feed Parser issue

2007-04-10 Thread i3dmaster
I have a sample Atom feed like this: http://app.example.com/fjie4id939xdl3io23 foo bar [EMAIL PROTECTED] 2007-04-09T22:14:15.000Z After parsed by feedparser, the timezone element does not get the attribute "America/Mountain". Same thing on status element. This does