Hi,
A colleague of mine has created a a python script for me which does something very neat.
It requires that flags are set in the script so for example script.py -h
I am trying to get it to run in R using the reticulate
package based on the documentation i found here
In python command prompt I can type something like this
(base) C:\Users\foo\neat-util>python util.py -h
usage: ['-h'] [-h] [-n N] [-r R]
optional arguments:
-h, --help show this help message and exit
I tried the same thing in R but get the following error
library(reticulate)
py_run_file("C:/Users/foo/neat-util/util.py -h")
# Error in py_run_file_impl(file, local, convert) :
# Unable to open file
# (does it exist?)
If i remove the flag it finds the file but then falls over because the flag is necessary to run the script.
Can anyone help?
Thank you for your time