I have a Python 3 script named main.py It runs when executed in Pycharm. I want to run this script from PAD but can't figure out how to call it. I tried to use AI to suggest a way forward. One iteration was to create a ps1 file and call that. That file was as shown below. Can someone please point me in the right direction. TIA
# Specify the path to your Python executable
$python_executable = "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\python.exe"
# Specify the path to your Python script
$python_script = "D:\Projects\Python\ocr_file\main.py"
# Construct the command to run the Python script
$command = "$python_executable $python_script"
# Print the command
Write-Host "Command to run Python script: $command"
# Execute the Python script
Invoke-Expression $command