USAGE EXAMPLES IN VISUALNEO WIN PUBLICATIONS
─────────────────────────────────────────────

Example 1 — Hello World
  pyInit "" "[pyResult]"
  If "[pyResult]" = "OK"
     pyExec "print('Hello from Python!')" "[pyResult]"
  End If

Example 2 — File listing using os module
  pyInit "" "[r]"
  pyExec "import os" "[r]"
  pySetVar "target_dir" "C:\Users\Public"
  pyExec "files = chr(10).join(os.listdir(target_dir))" "[r]"
  pyGetVar "files" "[FileList]"
  AlertBox "Files" "[FileList]"
  pyFinalize "[r]"

Example 3 — Arithmetic expression
  pyInit "" "[r]"
  pySetVar "x" "[UserInput]"
  pyEval "float(x) * 3.14159" "[pi_result]"
  AlertBox "Result" "[pi_result]"

Example 4 — Execute a .py analysis script
  pyInit "" "[r]"
  pyExecFile "[PublicationPath]\scripts\analyse.py" "[r]"
  pyGetVar "analysis_result" "[Output]"
  SetVar "[Display]" "[Output]"

Example 5 — Error handling pattern
  pyInit "" "[pyStatus]"
  If "[pyStatus]" <> "OK"
     AlertBox "Error" "Python init failed: [pyStatus]"
     GotoPage "ErrorPage"
  End If
  pyExec "result = 2 ** 10" "[pyStatus]"
  pyGetVar "result" "[Answer]"
  AlertBox "2^10 = " "[Answer]"
  pyFinalize "[pyStatus]"


FREQUENTLY ASKED QUESTIONS
───────────────────────────
Q: Which Python version should I install?
A: Python 3.8–3.12 (32-bit Windows installer).  Python 3.13 is untested.

Q: Can I use third-party packages (numpy, pandas, etc.)?
A: Yes — install them with pip into the 32-bit Python installation.
   The embedded interpreter inherits the same site-packages directory.

Q: Can I import modules that use C extensions?
A: Yes, as long as they are compiled for 32-bit Python.

Q: How do I pass multi-line code to pyExec?
A: In VisualNEO Win's Action Editor, use the pyExec wizard form (design
   time) which includes a TMemo editor.  At run time, embed newlines as
   Chr(10) in a SetVar then pass the variable as the code parameter.

Q: Does the plugin support Python virtual environments (venv)?
A: Yes — set the pyDllPath parameter in pyInit to the python3xx.dll
   inside the venv's DLLs folder (e.g. .venv\Scripts\python312.dll).

Q: The plugin installs but I get "Python DLL not found".
A: Install 32-bit Python 3.x from python.org and specify the full DLL
   path explicitly in the pyInit action parameter.
