Jump to content

marcovth

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. marcovth

    Calling python scripts. Returning python output.

    I am sorry, but I don't see how Demo1 could help me. What I am looking for is the very, very basic of what Python4Delphi should offer to python programmers checking out Delphi. Similar to a subprocess in python ... sysCall = subprocess.run(f"""Your.exe {argument1} {argument2}""",shell=True, capture_output=True) sysCallError = sysCall.stderr.decode('utf-8') if len(sysCallError.strip()) > 0: print(sysCallError) sysCall = sysCall.stdout.decode('utf-8') Continue to parse the sysCall output. I will check out the DOSCommand package before moving on to something else.
  2. Hello. Completely new to Delphi. I simply want to run a python script by pushing a button, and report back the python output. If possible, I would also want to give the python script command-line arguments. It's full of errors. Thanks for helping out. procedure TForm1.Button1Click(Sender: TObject); begin var pyIn := TStringList.Create; var pyOut : PPyObject; with PythonEngine1 do begin try pyIn.LoadFromFile('D:\Delphi\Projects\Projects1\test.py'); pyOut:=ExecStrings(pyIn); if Assigned(pyOut) then begin Memo1:= PyObjectAsString(pyOut); Py_DECREF(pyOut); end else Memo1:= 'No python output'; finally pyIn.Free; end; end; end;
  3. marcovth

    ANN: New Opencv v. 4.6 C++ API wrapper

    Is there any chance this OpenCV wrapper could work for Android apps? I am exploring if I could make a "Tourist filter" app with life view, similar to the Spectre app for iOS. https://beltoforion.de/en/the-tourist-filter/
×