Re: Is there a better way to set a system clock in Python (on a Linux system)

2010-05-05 Thread KDr2
man 2 clock_settime call it with ctypes -- Best Regards, -- KDr2 http://kdr2.net On Thu, May 6, 2010 at 10:47 AM, J wrote: > Is there a better way to do this? > > def SkewTime(): >''' >Optional function. We can skew time by 1 hour if we'd l

Re: which

2010-02-05 Thread KDr2
cmd= isinstance(cmd,str) and c.replace('${ADDR}',ip) or cmd Best Regards, -- KDr2 http://kdr2.net On Fri, Feb 5, 2010 at 10:21 PM, mk wrote: > > if isinstance(cmd, str): >self.cmd = cmd.replace(r'${ADDR}',ip) > else: >self.cmd = cmd > &

Re: simple iterator question

2009-04-02 Thread KDr2
>>> def xl(a): ... return list(reduce(lambda x,y:x+y,zip(*a))) ... >>> xl([[1,2],[3,4]]) [1, 3, 2, 4] like this? Best Regards, -- KDr2, at x-macro.com. On Thu, Apr 2, 2009 at 8:32 PM, Neal Becker wrote: > How do I interleave 2 sequences into a single sequence? &g