Changing the system clock with pexpect confuses pexpect!

Roy Smith roy at panix.com
Mon Dec 26 08:51:24 EST 2011


In article 
<1f342621-0c96-447c-ad5d-f8c9dc777883 at i6g2000vbe.googlegroups.com>,
 Saqib Ali <saqib.ali.75 at gmail.com> wrote:

> I believe what is going on is that internally pexpect uses the system
> clock to keep track of when it receives data from spawned processes.
> When I mess with the clock, that messes up the internal workings of
> pexpect.
> 
> Any suggestions what I should do?

Yeah.  Don't mess with the system clock.  Seriously.

There is pretty much no reason for anybody not to be running NTP these 
days.  Every OS ships with it, and there's gazillions of open NTP 
servers to use as references.

NTP will keep your system clock accurate to within a fraction of a 
second and avoid all the horrible problems such as the one you've 
discovered with pexpect when you reset your clock.



More information about the Python-list mailing list