Skip to content

communication between python and rp_varibles #3319

Answered by ansjschuetz
etiennelame asked this question in Q&A
Discussion options

You must be logged in to vote

Hello Etienne,
I understand that you try to modify an RP var. in a UDF and then want to query that value in Python.
For that, you need to make sure that...
-- the RP_Set_...("...", ...); in the UDF is done on the host process
-- you fetch the value from the host process into the cortex process using e.g. the Scheme command (%rpgetvar '...) (where '... is the name of the RP var. with a leading single quote).
I don't know whether there is a Python equivalent for the latter.
If not, you should be able to use solver.execute_tui(r'''(%rpgetvar '...)''').
(Note that in this Scheme command the % prefix makes the difference -- it ensures that the value is fetched from the host process instead of …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@etiennelame
Comment options

@cons013
Comment options

@etiennelame
Comment options

Answer selected by hpohekar
Comment options

You must be logged in to vote
1 reply
@etiennelame
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants