xlwings icon indicating copy to clipboard operation
xlwings copied to clipboard

Enable "Show Console" only for certain functions

Open goroderickgo opened this issue 2 years ago • 2 comments

OS (e.g. Windows 10 or macOS Sierra)

Windows 10, Windows Server

Versions of xlwings, Excel and Python (e.g. 0.11.8, Office 365, Python 3.7)

Python 3.9, xlwings 0.27.15

Describe your issue (incl. Traceback!)

Is it possible to enable the "Show Console" option for RunPython on a case-by-case basis (e.g., as some kind of option/argument that's passed to RunPython)? The only other way I could think of doing so was to add a line of VBA before I call RunPython to set "Show Console" to TRUE

goroderickgo avatar Sep 20 '22 17:09 goroderickgo

I agree that function calls should be configurable:

  • This has come up before: https://github.com/xlwings/xlwings/issues/593
  • And is already implemented in the new RunRemotePython call
  • Better configuration handling is also part of my preliminary 1.0 plan: https://github.com/xlwings/xlwings/issues/1993

In this specific case, however, be aware of it only making sense in the classic RunPython version where it starts a fresh console/interpreter with every call. It wouldn't really work well in case you're using UDF Server=True.

fzumstein avatar Sep 20 '22 18:09 fzumstein

Thanks @fzumstein, this all makes sense and thanks for the explanation about the roadmap item. Definitely continues to be a useful library!

goroderickgo avatar Sep 21 '22 20:09 goroderickgo