Error with Python sleep() command on http://rept.it -



Error with Python sleep() command on http://rept.it -

i'm working on project involving sleep() command, (running 2.7.2) , it's throwing errors i've never seen before. here's test script wrote:

from time import sleep print '1' sleep(2) print '2'

it returns:

>> 1 >> internal error: referenceerror: _select not defined

any help appreciated

time.sleep() uses select if available. reason have_select defined when python built, library can't found.

from docs

... on other hand, precision of time() , sleep() improve unix equivalents: times expressed floating point numbers, time() returns accurate time available (using unix gettimeofday() available), , sleep() take time nonzero fraction (unix select() used implement this, available). ...

from source:

floatsleep(double secs) { /* xxx should test ms_windows first! */ #if defined(have_select) && !defined(__beos__) && !defined(__emx__) struct timeval t; double frac; frac = fmod(secs, 1.0); secs = floor(secs); t.tv_sec = (long)secs; t.tv_usec = (long)(frac*1000000.0); py_begin_allow_threads if (select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &t) != 0) { #ifdef eintr ...

could python compiled different environment running.

where did python come from? how compiled?

python python-2.7 time runtime-error sleep

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -