Stderr and Pythonw

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

    Stderr and Pythonw

    Hi everyone,

    I've seen this subject come up in another thread, but not getting
    enough attention - so I'll just ask it:
    When running python code via pythonw, what exactly happens to stderr?
    I tried running code that, among else, writes to stderr - and at some
    point I get an IOError claiming "Bad file descriptor".

    Why is this happending?

    Thanks in advance,

    vm
  • Dennis Lee Bieber

    #2
    Re: Stderr and Pythonw

    On 29 Jun 2004 12:25:58 -0700, vm_usenet@yahoo .com (vm_usenet) declaimed
    the following in comp.lang.pytho n:
    [color=blue]
    > When running python code via pythonw, what exactly happens to stderr?[/color]

    You aren't invoking programs by typing "pythonw program.py" in a
    command console window, are you?

    pythonw was intended to be used for programs activated by
    clicking on icons in Windows. As such, these programs are presumed to
    have NO CONSOLE I/O, all I/O must be handled by the program creating a
    window (GUI) or file and writing to that.

    Since there is no console expected, none of the std***
    connections are created.

    --[color=blue]
    > =============== =============== =============== =============== == <
    > wlfraed@ix.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG <
    > wulfraed@dm.net | Bestiaria Support Staff <
    > =============== =============== =============== =============== == <
    > Home Page: <http://www.dm.net/~wulfraed/> <
    > Overflow Page: <http://wlfraed.home.ne tcom.com/> <[/color]

    Comment

    • Manlio Perillo

      #3
      Re: Stderr and Pythonw

      On Wed, 30 Jun 2004 04:22:16 GMT, Dennis Lee Bieber
      <wlfraed@ix.net com.com> wrote:
      [color=blue]
      >On 29 Jun 2004 12:25:58 -0700, vm_usenet@yahoo .com (vm_usenet) declaimed
      >the following in comp.lang.pytho n:
      >[color=green]
      >> When running python code via pythonw, what exactly happens to stderr?[/color]
      >
      > You aren't invoking programs by typing "pythonw program.py" in a
      >command console window, are you?
      >
      > pythonw was intended to be used for programs activated by
      >clicking on icons in Windows. As such, these programs are presumed to
      >have NO CONSOLE I/O, all I/O must be handled by the program creating a
      >window (GUI) or file and writing to that.
      >
      > Since there is no console expected, none of the std***
      >connections are created.
      >[/color]

      This not really corrected.
      Actually 'some' std*** connections are created but are usefulness
      (and moreover they have a bug).

      If you write more than 4096 an exception is raised...


      Regards Manlio Perillo

      Comment

      • Peter Hansen

        #4
        Re: Stderr and Pythonw

        Manlio Perillo wrote:
        [color=blue]
        > On Wed, 30 Jun 2004 04:22:16 GMT, Dennis Lee Bieber
        > <wlfraed@ix.net com.com> wrote:[color=green]
        >>On 29 Jun 2004 12:25:58 -0700, vm_usenet@yahoo .com (vm_usenet) declaimed
        >>the following in comp.lang.pytho n:[color=darkred]
        >>>When running python code via pythonw, what exactly happens to stderr?[/color]
        >>
        >> Since there is no console expected, none of the std***
        >>connections are created.[/color]
        >
        > This not really corrected.
        > Actually 'some' std*** connections are created but are usefulness
        > (and moreover they have a bug).
        >
        > If you write more than 4096 an exception is raised...[/color]

        And, for future reference, here is the bug report Manlio filed
        on SourceForge (for which there is no response yet):



        I've also confirmed this, using a test script very similar to one
        Tim Peters posted a couple of months ago in


        The problem is confirmed to still exist with Python 2.3.4.

        -Peter

        Comment

        Working...