Re: Print statement isn't showing up?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Timothy Grant

    Re: Print statement isn't showing up?

    On Tue, Aug 5, 2008 at 9:09 AM, Robert Dailey <rcdailey@gmail .comwrote:
    Hi,
    >
    I have the following code:
    >
    >
    def ReplaceExternal WithCopy( localDir, remoteDir ):
    print "Removing external local directory:", localDir
    rmdirs( localDir )
    vfxrepo.copy( remoteDir, localDir )
    >
    I noticed that the print statement above does not show up before
    vfxrepo.copy() is called. the copy() function (as well as the rmdirs()
    function) are very long file-system calls that take up to 5 minutes. I
    should see a print statement before these are executed, but I do not.
    Instead it shows up *after* the last 2 lines of code have completed. Is
    there something broken about this?
    My guess is that the output is getting buffered and the buffer doesn't
    get flushed until sometime after the function executes.

    --
    Stand Fast,
    tjg. [Timothy Grant]
  • Lie

    #2
    Re: Print statement isn't showing up?

    On Aug 6, 2:28 am, "Timothy Grant" <timothy.gr...@ gmail.comwrote:
    On Tue, Aug 5, 2008 at 9:09 AM, Robert Dailey <rcdai...@gmail .comwrote:
    Hi,
    >
    I have the following code:
    >
    def ReplaceExternal WithCopy( localDir, remoteDir ):
        print "Removing external local directory:", localDir
        rmdirs( localDir )
        vfxrepo.copy( remoteDir, localDir )
    >
    I noticed that the print statement above does not show up before
    vfxrepo.copy() is called. the copy() function (as well as the rmdirs()
    function) are very long file-system calls that take up to 5 minutes. I
    should see a print statement before these are executed, but I do not.
    Instead it shows up *after* the last 2 lines of code have completed. Is
    there something broken about this?
    >
    My guess is that the output is getting buffered and the buffer doesn't
    get flushed until sometime after the function executes.
    >
    --
    Stand Fast,
    tjg. [Timothy Grant]
    Are you calling this function from inside, say, doctests-watched
    comments.

    Comment

    Working...