Comments (8)
Python stores command line parameters in sys.argv (list object). You can manipulate sys.argv before running the file.
And PLEASE stop using the Issue Tracker for questions.
from python4delphi.
Issue Tracker is on Github and was created to ask questions, what is the problem?
from python4delphi.
was created to ask questions
No. The issue tracker is for reporting bugs. PLEASE don't use it to ask questions.
from python4delphi.
No. The issue tracker is for reporting bugs. PLEASE don't use it to ask questions.
Sorry, I don't have many questions, just a couple of questions.
from python4delphi.
It’s a little unclear how it goes like this ?:
function ExecPythonFile(const Filename:string;params:string):string;
var
FGILState: PyGILstate_STATE;
begin
Result := '';
FGILState := PythonEngine.PyGILState_Ensure;
try
PythonEngine.PySys_SetArgv(0, '-help');
PythonEngine.ExecFile(Filename);
finally
PythonEngine.PyGILState_Release(FGILState);
end;
end;
from python4delphi.
I'm getting errors for some reason
PythonEngine.PySys_SetArgv(0, PPWideChar('-in -o -m'));
Invalid typecast
from python4delphi.
Will this be right ?
function ExecPythonFile(const Filename:string;params:string):string;
var
args:PPWideChar;
FGILState: PyGILstate_STATE;
begin
Result := '';
args:=@params;
FGILState := PythonEngine.PyGILState_Ensure;
try
PythonEngine.PySys_SetArgv(0, args);
PythonEngine.ExecFile(Filename);
finally
PythonEngine.PyGILState_Release(FGILState);
end;
end;
ExecPythonFile(ExtractFilePath(ParamStr(0))+'pyscript\main.py, '-i -o -threads 10')
from python4delphi.
No, it doesn’t work, and if only the first parameter one works, the rest are ignored =(
I don’t quite understand how to do it
from python4delphi.
Related Issues (20)
- Running python code in Delphi threads issue HOT 1
- Pyhton4Delphi and streamlit HOT 3
- How to specify the path to Python libraries? HOT 4
- How can I output the results of a py script? HOT 9
- OnSendUniData event does not work HOT 4
- Wrongly throwing an exception from the wrapping object HOT 2
- A little problem HOT 2
- Error in ExtractPythonObjectFrom when creating Enum? HOT 1
- [dcc64 fatal error] PythonVcl.dpk: F2084 Internal Error on RAD Studio 12.1 HOT 6
- Minor: Typo in error message
- Pandas with Python 3.12 HOT 13
- using python4delphi via compiled DLL, avoids reading variables from python to delphi HOT 1
- Access violation: Open Tk GUI and running a python function without closing the GUI HOT 4
- cant't install HOT 1
- CustomDrawStateToPython return always all TCustomDrawState HOT 4
- TPythonType.NewSubtypeInst() destroys the object twice in case of error
- Geederiv bot HOT 1
- Delphi XE2 does not support TStringHelper.Split HOT 1
- import cv2 report errors :Floating point division by zero HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python4delphi.