Linux and TProcess lazarus / 8-Other ---------------------------------------------------------------------- Sora-Kun · 2010-06-19 14:45 Hello, I add the command 'python' to the Process, but when I execute it, nothing happened, python is installed, and when I type python on my terminal, it starts python. Any body knows what it doesn't work or I'm mistaken . Please help. Thanks ---------------------------------------------------------------------- davesimplewear · 2010-06-19 18:25 I am not sure how you used the Tprocess, but declare Procees in uses clause then as follows Code: [Select]procedure TfAdmin.sbEmailClick(Sender: TObject); var aProcess:Tprocess; begin   AProcess := TProcess.Create(nil);   AProcess.CommandLine := 'Command';   AProcess.Options := AProcess.Options + [poWaitOnExit];   AProcess.Execute;   AProcess.Free; end; There is a section in the wiki how to use, I have found it useful in executing external programs. Regards Dave ---------------------------------------------------------------------- theo · 2010-06-19 23:20 TProcess is not a Shell. You have to give it the full path, like /usr/bin/python You can also use this: FindDefaultExecutablePath('python'); ---------------------------------------------------------------------- Sora-Kun · 2010-06-20 05:01 Thanks, the 1st One is better it works ---------------------------------------------------------------------- rajivsoft · 2010-12-14 18:34 hi, i' using this code on Lazarus Mac OS X: Code: [Select]procedure TCoreEng.StartCal(); var   Proc : TProcess;   path: string; begin   Proc := TProcess.Create(nil);   try     path:='/Applications/iCal.app';     Proc.CommandLine := path;     Proc.Options := Proc.Options + [poWaitOnExit];     Proc.CommandLine := Proc.CommandLine; //+ ' -someparam';     Proc.Execute;     //ShowMessage(BoolToStr(Proc.WaitOnExit));     ShowMessage(IntToStr(Proc.ExitStatus));   finally     Proc.free;   end; end; but i can't ever see iCal starting, ShowMessage of ExitStatus give me a 127 code, if i also use WaitOnExit either ShowMessages give me -1 code...