954,525 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

python thread problem after build

hi expert, i'm newbie for python, anywhere i'm learning from internet sample, i got doubt here, i found below sample for thread

import threading
def hello():
print "Hello"
t = threading.Timer(2, hello).start()

t = threading.Timer(2, hello)
t.start()

this working fine when run manually ( python thread.py)

but i try to build it, then try to run the executable file, but nothing is happen, can anyone explain this, is thread not working on build

thanks

d.devendran
Newbie Poster
5 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

import py_compile
py_compile.compile('thread.py')

it will create .pyc file

utpalendu
Newbie Poster
11 posts since Apr 2010
Reputation Points: 11
Solved Threads: 5
 

What do you mean by "build"... because Python doesn't have much of a concept of "build."

jcao219
Posting Pro in Training
417 posts since Dec 2009
Reputation Points: 28
Solved Threads: 97
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: