Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'attribute': 0.07; '"__main__":': 0.09; '__name__': 0.09; 'main()': 0.09; 'skip:# 30': 0.09; 'cc:addr:python-list': 0.11; 'def': 0.12; 'main():': 0.16; 'simplified': 0.16; 'true:': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'import': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'error': 0.23; 'now?': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'code': 0.31; '"",': 0.31; 'skip:= 40': 0.31; 'file': 0.32; 'figure': 0.32; 'url:python': 0.33; '(most': 0.33; 'fri,': 0.33; 'problem': 0.35; 'except': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'url:org': 0.36; 'recent': 0.39; 'url:mail': 0.40; 'new': 0.61; 'here': 0.66; '26,': 0.68; 'jul': 0.74; 'touch': 0.74; 'do:': 0.91; 'to:none': 0.92; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=w/LIcOt1N6H1WRyg5bxGHbMVVvOLkp9RKieeDpen0bM=; b=bNbQ/vhdPRP6VOV7Zl/DKKjfRf0c4QgRN+NQmQM8HaJfJm0ndJKuKYcXp6MA/9Rkcs p/a9QL014P6FNNvnEMz5e5XHdS6r8JE8GMl8LNDDseQ8rYMSjhds4yf7/Daq7Tw0nxG7 W7hoWpemArXMNkh0yXL4BX8QQHtxaNU5fSAzZPC5DpGb4VJImIAq/Snz/mietiuPvY5x PISRBVNDScJ6UewQi/fi0FwOM9XqI4wIs7M+92WYgAFunhYJNvRKHok6a3G76I0574lH PL/K/fcWZUJ2qKL20OAylSIXahiYE8XqBCnC3GW6Rh8tHJvOqY3RgWIhbjYmA5TSXQ8y D58w== MIME-Version: 1.0 X-Received: by 10.60.79.131 with SMTP id j3mr48718145oex.96.1374855279494; Fri, 26 Jul 2013 09:14:39 -0700 (PDT) In-Reply-To: <965b463e-e5bf-4ccd-9a3c-b0cb964b3356@googlegroups.com> References: <965b463e-e5bf-4ccd-9a3c-b0cb964b3356@googlegroups.com> Date: Fri, 26 Jul 2013 12:14:39 -0400 Subject: Re: embedded python and threading From: David Robinow Cc: python-list@python.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374855283 news.xs4all.nl 15911 [2001:888:2000:d::a6]:40799 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51314 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 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 "", line 10, in ? > 9: File "", line 6, in main > 9: AttributeError: 'builtin_function_or_method' object has no attribute 'sleep' > ========================================== > -- > http://mail.python.org/mailman/listinfo/python-list