Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 06/23/24 in all areas

  1. pyscripter

    PyScripter - Integration with LLM

    The forthcoming version of PyScripter will have built-in integration with LLM. See the blog post for a taste of the functionality provided.
  2. pyscripter

    PyScripter - Integration with LLM

    Real soon!
  3. pyscripter

    DelphiVCL4Python

    You are posting on the General Help forum. Since your topic is related to P4D you will get a better response by posting such questions to the Python4Delphi forum. The pydfm file plays the role of the dfm file in delphi. The statement self.LoadProps(os.path.join(os.path.dirname(os.path.abspath(__file__)), "MainForm.pydfm")) creates the controls and loads the design properties. Have a look at the demo DelphiVCL4Python/samples/DesignExport/SampleForm/MainForm.py at main · Embarcadero/DelphiVCL4Python (github.com) After the call to LoadProps, you can modify the controls. For example: self.LoadProps(os.path.join(os.path.dirname(os.path.abspath(__file__)), "MainForm.pydfm")) self.Button1.Caption = 'New Caption' Will show Button1 with Caption = 'New Caption' You can assign python code to events (e.g self.Button1.OnClick = ) or customize the controls in any way you wish.
  4. As far as testing goes, so far this has not progressed well - the build process has changed which means the automation in Codex has broken, as well as the BuildBundle batch file that is provided with the demo. More later...
  5. Sherlock

    Suggestion for next version name - YASAB

    My D12.1 is running in a VM and it's fast.
  6. Luciano Veneziano

    Upload files from Delphi to PHP

    Funziona perfettamente: function httpsUpload(URL : string; fname : String ) : String; var LRequest: THTTPClient; LFormData: TMultipartFormData; LResponse: TStringStream; begin LRequest := THTTPClient.Create; LFormData := TMultipartFormData.Create(); LResponse := TStringStream.Create; try LFormData.AddField('json', '{"id":1,"user":"Luciano"}'); //optional LFormData.AddFile('file', fname); LRequest.Post(URL, LFormData, LResponse); Result := LResponse.DataString; finally LFormData.Free; LResponse.Free; LRequest.Free; end; end; phpfile <?php include_once("local/setup.php"); $where = $_FILES["file"]["name"]; if(move_uploaded_file($_FILES["file"]["tmp_name"], $where)) { echo "OK\r\n"; } else { echo "ERR\r\n"; } print_r($_FILES); ?>
  7. Yes: https://github.com/DelphiWorlds/Kastri/tree/master/Demos/AssetDelivery
×