Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Execute Python Code in QM Using python.net
#15
Running the same `Pynet` class code in QM and LA shows different behavior for the `print` statement:

1. In QM's output panel: each printed line is followed by two extra blank lines, as shown in the image.   https://i.ibb.co/G4qx7d6b/pyqm.png
2. In LA's output panel: there are no extra blank lines. https://i.ibb.co/35J1jqNH/prla.png

What is happening here?
 
Code:
Copy      Help
string code = """
###pywin32
import ctypes
print("hello world from python!")

import win32print
print(win32print.__file__)

default_printer = win32print.GetDefaultPrinter()
print(default_printer)
"""
;

using var pyn = new Pynet();
pyn.Module.Exec(code);


Messages In This Thread
RE: Execute Python Code in QM Using python.net - by Davider - 06-09-2025, 11:06 AM
RE: First steps with Python.NET - by Davider - 06-09-2025, 03:30 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)