Werner,
On Thu, Aug 8, 2013 at 12:14 AM, werner <
wbr...@free.fr> wrote:
> Hi Igor,
>
>
> On 08/08/2013 02:46, Igor Korot wrote:
>>
>> Hi, ALL,
>> This is my first post here as I just started with wxPython.
>
> Welcome!
Thank you.
I'm just more used to C++ version of wx then wxPython. ;-)
>
>> Here is what I am looking for:
>> I designed a script using wxPython GUI. In this script I collect some data
>> and when the user clicks the button I want to execute another script
>> that I imported. That second script has following lines in the beginning
>> of the main function:
>> format_str = '[%(levelname)s] %(message)s'
>> logging.basicConfig(level=logging.INFO, format=format_str)
>> Now what I am trying to do is start a dialog with text control, execute
>> the external script and the logging that this secondary script will produce
>> should go to my text control inside dialog.
>
> You need to define a handler for your logging to write the log to a file and
> then read it in from that file and write it to your text control.
I wish there was an example of how to use python and wxPython logging
along with all
other wxPython demos/samples.
Now, is there a way to do a redirect for the python logger to become
my text control?
When I run the script from shell, I see a lot of messages that I'd
like to see spit in there.
>
> You also might want to consider using a logging configuration file instead
> of using basicConfig.
Thing is this external script is not made by me and it's external to
the tool I'm working with.
So, it would be great if it will not be changed at all to ease the
pain of maintaining our own version.
I will look it up though.
Thank you.
> --
> You received this message because you are subscribed to the Google Groups
> "wxPython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
wxpython-user...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>