Skip to content
Discussion options

You must be logged in to vote

The problem is that runFile is only intended for non-interactive execution of scripts whereas run and runResults are interactive. Because you imported the file with run, you want to use runResults instead of runFile; you also don't need to convert them to (Java) string first, as the function will handle that for you.

Attempt attempt = pyCommunicator.runResults("name_script.name_func(%s, %s)", dia, mes);

Note that if name_func is expecting those values as (Python) strings, you'll need to put single quotes around the string formatters (%s). (I noticed your other comment shows it's expecting integers, so the code above is valid)

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@GammaLyra
Comment options

@t-wolfeadam
Comment options

Comment options

You must be logged in to vote
1 reply
@t-wolfeadam
Comment options

Comment options

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

Answer selected by GammaLyra
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