Philippe Teuwen
cd2c576be6
Fixes for Python 3.14
2026-02-07 01:24:21 +01:00
Philippe Teuwen
26c8b502e2
cppcheck: fix null ptr dereference
2026-02-06 15:55:14 +01:00
Philippe Teuwen
39c846ada4
Limit pyexception code to Python >= 3.10
2024-11-14 01:44:35 +01:00
Philippe Teuwen
96f85d38bc
some PyStatus
2024-11-11 23:26:27 +01:00
Philippe Teuwen
60e932f2f7
get python3 scripts running with venv
2024-11-09 01:24:34 +01:00
iceman1001
20a0bc3a81
style
2024-09-14 15:03:29 +02:00
iceman1001
a18ec2b54e
the string params for scripting was limited to 256 chars, this has been increased to 1024 chars, allowing for 512 hex bytes to be read. remember spaces will count as a char when using the quotes. Also increased file name array to match the rest of the pm3 client length.
2024-09-11 12:08:28 +02:00
Philippe Teuwen
3a5f3e94d1
pm3 calling python scripts: give full path to script in argv[0]
2024-08-11 11:53:13 +02:00
s00se
51bea8995b
cmdscript.c: explicitly include ctype header
...
https://bugzilla.redhat.com/show_bug.cgi?id=2245823
Signed-off-by: s00se <95649696+s00se@users.noreply.github.com >
2023-10-24 16:00:22 -06:00
Jean-Michel Picod
5a2c6406d8
Allow current directory to import python libraries
...
also fixed a bunch of wrong comments.
2023-02-13 21:58:34 +01:00
iceman1001
37d059d56f
style
2023-01-27 03:00:26 +01:00
Jean-Michel Picod
3a7af55724
Fix python initialization to have SWIG work
2023-01-16 19:57:42 +01:00
iceman1001
9888eef8dc
changed hf mf wrbl and view command to look for strict readonly ACL in the data.
2023-01-06 23:53:25 +01:00
Jean-Michel Picod
4375f5b91e
Avoid memory leaks with Python <3.10
2022-12-20 15:32:38 +01:00
Nitraiolo
96d8528a0a
Inverted condition in python check so it defaults to new code now.
2022-12-18 09:45:46 +01:00
Nitraiolo
997e5aac3e
Fix py_args[] population
2022-12-17 21:49:04 +01:00
Nitraiolo
912d9be2d1
Added major version into compile condition of cmdscript
2022-12-17 20:12:12 +01:00
Nitraiolo
0d2e86f99c
Conditional build of cmdscript to allow compilation with old python
...
versions (<3.10.x)
2022-12-17 15:26:36 +01:00
Jean-Michel Picod
0083e0ae13
Fix embedded python not working with Proxspace.
2022-12-09 21:58:28 +01:00
Jean-Michel Picod
b487961cbd
Moved to non-deprecated API to init Python intepreter
2022-12-06 18:07:10 +01:00
iceman1001
38cb327991
fix #1829 Py_SetProgramName is deprecated, but was optional in our code.
2022-12-05 19:28:42 +01:00
Philippe Teuwen
a09c2bdfc0
Fix segfault when client is using python scripts on armhf
2022-02-04 02:18:10 +01:00
Philippe Teuwen
30aa7aa7d1
Adapting license headers, WIP
2022-01-08 00:40:52 +01:00
Philippe Teuwen
88308ea727
typos
2021-10-10 01:35:45 +02:00
iceman1001
e4f55556ba
style
2021-05-05 21:04:48 +02:00
iceman1001
8172c708c3
cppchecker and some renaming
2021-04-20 11:00:39 +02:00
Philippe Teuwen
a7ad668f83
script run help
2021-04-20 10:50:24 +02:00
Philippe Teuwen
7fbe4063b2
fix for script run & cliparser
2021-04-20 10:24:52 +02:00
Philippe Teuwen
06d61cdb7f
fix script run for now, to be seen if we can do better
2021-04-20 01:41:34 +02:00
Philippe Teuwen
11c7ead732
Add -h/--help support to last commands
2021-04-19 01:43:26 +02:00
iceman1001
bcb83e01a9
text
2021-03-09 16:16:50 +01:00
Philippe Teuwen
59667e5d1b
make style (linux)
2020-11-29 00:28:56 +01:00
Philippe Teuwen
eadacd82f5
SWIG experiments
...
Squash of the following commits (a full rebase was too hard :( )
* ef309cfdf N - SWIG: create pm3.c (5 months ago) <Philippe Teuwen>
* 05ba6a73f N - swig pm3_device -> pm3 (5 months ago) <Philippe Teuwen>
* d59630183 N - swig: move pm3.i (5 months ago) <Philippe Teuwen>
* 6adcfad75 N - Fix historic make & cmake (5 months ago) <Philippe Teuwen>
* bcbef2edf N - Fix typo with script_embedded (5 months ago) <slurdge>
* 538ee4dab N - Better SWIG integration: autogen func & attributes (5 months ago) <slurdge>
* 756b62466 N - SWIG: few helper scripts (5 months ago) <Philippe Teuwen>
* 47ba4acd0 N - SWIG %extend (5 months ago) <Philippe Teuwen>
* 21841cb9d N - simplify scripts (5 months ago) <Philippe Teuwen>
* 78c4f7929 N - Revert "SWIG experiments: introduce context" (5 months ago) <Philippe Teuwen>
* 1562b75fc N - SWIG experiments: introduce context (5 months ago) <Philippe Teuwen>
* a503dfcd9 N - SWIG experiments (5 months ago) <Philippe Teuwen>
2020-11-10 23:27:21 +01:00
iceman1001
fbec6b0c35
puts -> printandlog
2020-10-05 12:58:33 +02:00
Philippe Teuwen
6d3c1d0223
script list: recurse in subdirs
2020-08-13 23:10:11 +02:00
Philippe Teuwen
f69739da79
make style
2020-06-19 18:34:47 +02:00
Philippe Teuwen
797fa7d01a
Tolerate exit-like calls from embedded Python script
...
Now sys.exit(0) is silently accepted, while
quit() / raise SystemExit / sys.exit() / sys.exit(n) / exit()
will output sth a warning such as
"Script terminated by SystemExit -1"
Still, don't call os._exit(0), it immediately exits.
2020-06-13 14:53:47 +02:00
Philippe Teuwen
224cb2ffd7
make style
2020-06-08 03:15:10 +02:00
iceman1001
a62199ac0f
fix: coverity 290109 resouce leak
2020-06-02 09:15:56 +02:00
iceman1001
a8c3859ed1
chg, 'script run' - added hint
2020-05-27 10:19:22 +02:00
Philippe Teuwen
fcfdd92407
python: adjust help, hide more if no python available, search lua/cmd/py if no extension given
2020-05-27 01:15:20 +02:00
Philippe Teuwen
b4c715d8fb
script run: look for all three extensions if not specified
2020-05-27 00:40:01 +02:00
iceman1001
125e05ec0e
chg, clean up
2020-05-26 21:58:50 +02:00
iceman1001
176f0dfe75
chg, function available in v3.6 Travis has v3.5...
2020-05-26 17:35:27 +02:00
iceman1001
f7537519ff
chg, make python aware of pm3 search paths
2020-05-26 14:41:58 +02:00
iceman1001
3f02fa6e34
chg, right number of args..
2020-05-26 13:37:28 +02:00
iceman1001
4aa4006167
chg, python should close the script file
2020-05-26 13:09:18 +02:00
iceman1001
366ac6a41f
creating argc/argv
2020-05-26 12:35:26 +02:00
iceman1001
e106a5717c
simple script working
2020-05-26 12:17:41 +02:00
iceman1001
6e3e1baef7
logsss
2020-05-26 12:00:42 +02:00