embedded python and threading

David Robinow drobinow at gmail.com
Fri Jul 26 12:14:39 EDT 2013


Works for me.
Except that if I then do:
  touch time.py

I get the same error as you do.

Can you figure out the problem now?

On Fri, Jul 26, 2013 at 11:57 AM, David M. Cotter <me at davecotter.com> wrote:
> okay, i have simplified it:  here is the code
>
> ==========================================
> import time
>
> def main():
>         while True:
>                 print "i'm alive"
>                 time.sleep(0.25)
>
> #---------------------------------
> if __name__ == "__main__":
>         main()
> ==========================================
>
> the new error is:
>
> ==========================================
>     9: Traceback (most recent call last):
>     9:   File "<string>", line 10, in ?
>     9:   File "<string>", line 6, in main
>     9: AttributeError: 'builtin_function_or_method' object has no attribute 'sleep'
> ==========================================
> --
> http://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list