how to pause a forked process

j vickroy jvickroy at sec.noaa.gov
Thu Jun 15 12:17:40 EDT 2000


Hello,
Path: news!uunet!ffx.uu.net!newsfeed.easynews.net!easynews.net!easynet-tele!easynet.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!logbridge.uoregon.edu!den-news-02.qwest.net!qwest!news.boulder.noaa.gov!not-for-mail
Xref: news comp.lang.python:99777

How can execution be paused in a child process?

This is what I tried:

import os
import time

pid = os .fork()

if pid == 0: # child
    # do some work
    time .sleep (5)

else: # parent
    # do some work

The sleep() call is flagged as:
    AttributeError: sleep

The above code is part of a Tkinter application.  Could this error have
anything to do with that?

Thanks for your time.




More information about the Python-list mailing list