wxPython log/print question

Discussion in 'Python' started by Edward K. Ream, Oct 7, 2003.

  1. Creating a wxApp object in wxPython causes all calls to print go to a fake
    console window. This is most inconvenient if errors during startup causes
    the fake window to go away. How can I disable this "feature" so that
    Python's print statement continues to send its output to the xp console?

    Thanks,

    Edward
    --------------------------------------------------------------------
    Edward K. Ream email:
    Leo: Literate Editor with Outlines
    Leo: http://webpages.charter.net/edreamleo/front.html
    --------------------------------------------------------------------
     
    Edward K. Ream, Oct 7, 2003
    #1
    1. Advertising

  2. Edward K. Ream

    Dave Brueck Guest

    On Tuesday 07 October 2003 02:02 pm, Edward K. Ream wrote:
    > Creating a wxApp object in wxPython causes all calls to print go to a fake
    > console window. This is most inconvenient if errors during startup causes
    > the fake window to go away. How can I disable this "feature" so that
    > Python's print statement continues to send its output to the xp console?


    Yeah, I remember that. Short-term: start with "python -i" so that the
    interpreter stays running and the messages don't go away. There *is* a way to
    disable this - I don't remember exactly where but do remember it wasn't too
    painful to find - check the source for the wxApp class (in wx.py I think).

    Try wxApp(None).

    -Dave
     
    Dave Brueck, Oct 7, 2003
    #2
    1. Advertising

  3. > Try wxApp(None).

    Yes. This works. Thanks so much. And I'll remember to consult the source
    next time...

    Edward
    --------------------------------------------------------------------
    Edward K. Ream email:
    Leo: Literate Editor with Outlines
    Leo: http://webpages.charter.net/edreamleo/front.html
    --------------------------------------------------------------------
     
    Edward K. Ream, Oct 7, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Henrik_the_boss
    Replies:
    0
    Views:
    2,711
    Henrik_the_boss
    Nov 5, 2003
  2. Amratash
    Replies:
    0
    Views:
    559
    Amratash
    Apr 13, 2004
  3. =?Utf-8?B?VG9tIFdpbmdlcnQ=?=

    My.Log.Writeexception not writing to Application Event Log.

    =?Utf-8?B?VG9tIFdpbmdlcnQ=?=, Jan 20, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    2,412
    =?Utf-8?B?VG9tIFdpbmdlcnQ=?=
    Jan 20, 2006
  4. keto
    Replies:
    0
    Views:
    1,043
  5. David Cournapeau

    print a vs print '%s' % a vs print '%f' a

    David Cournapeau, Dec 30, 2008, in forum: Python
    Replies:
    0
    Views:
    399
    David Cournapeau
    Dec 30, 2008
Loading...

Share This Page