0

I am executing a python script file from C#. That Python file is generating some logs, i have to get those logs back to my C# UI at run time i.e. every-time a log message is generated, my C# UI will be notified and the message is displayed in my UI.

  • why don't you use `FileSystemWatcher` from C# to monitor changes to log file? – Nino Apr 18 '17 at 11:44
  • The problem i am facing here is The Python logging (logging module) is not saving the file until the script is executed completely. How can i use FileSystemWatcher to read from file which is not yet saved? – Deepanshu Bhatti Apr 18 '17 at 12:23
  • Similar question answered here: http://stackoverflow.com/a/9757063/4815429 Look at using the [FileSystemWatcher Class](https://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx) – ThrowingSpoon Apr 18 '17 at 11:44

0 Answers0