Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #51314

Re: embedded python and threading

References <a6710206-8676-48c8-ad66-95139e695503@googlegroups.com> <mailman.5138.1374831002.3114.python-list@python.org> <965b463e-e5bf-4ccd-9a3c-b0cb964b3356@googlegroups.com>
Date 2013-07-26 12:14 -0400
Subject Re: embedded python and threading
From David Robinow <drobinow@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.5153.1374855283.3114.python-list@python.org> (permalink)

Show all headers | View raw


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@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

embedded python and threading "David M. Cotter" <me@davecotter.com> - 2013-07-25 23:15 -0700
  Re: embedded python and threading Stefan Behnel <stefan_ml@behnel.de> - 2013-07-26 11:29 +0200
    Re: embedded python and threading "David M. Cotter" <me@davecotter.com> - 2013-07-26 08:57 -0700
      Re: embedded python and threading David Robinow <drobinow@gmail.com> - 2013-07-26 12:14 -0400
      Re: embedded python and threading John Gordon <gordon@panix.com> - 2013-07-26 16:34 +0000
        Re: embedded python and threading "David M. Cotter" <me@davecotter.com> - 2013-07-26 10:25 -0700
          Re: embedded python and threading "David M. Cotter" <me@davecotter.com> - 2013-07-26 10:28 -0700
            Re: embedded python and threading Stefan Behnel <stefan_ml@behnel.de> - 2013-07-26 20:38 +0200

csiph-web