diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | launcher.py | 19 | ||||
-rw-r--r-- | source_file.py | 3 | ||||
-rw-r--r-- | source_file.r | 3 |
4 files changed, 13 insertions, 15 deletions
@@ -1,2 +1,3 @@ *demo* -notes.txt
\ No newline at end of file +notes.txt +git_flow.txt
\ No newline at end of file diff --git a/launcher.py b/launcher.py index 31713f4..544dfc9 100644 --- a/launcher.py +++ b/launcher.py @@ -1,25 +1,16 @@ -import idlelib import os from subprocess import * -# If I can't find the R path, I could have a dedicated r procedure that finds R.home() and puts that into a text file. - print(os.getcwd()) -#open demp.py -# demo_fil = os.path.join(os.getcwd(),'demo.py') -# if os.path.exists(demo_fil): -# idle_bat = idlelib.__file__.replace('__init__.py','idle.bat') -# Popen(f'{idle_bat} "{demo_fil}"') - -tar_fil = os.path.join(os.getcwd(),'demo.r') +tar_fil = os.path.join(os.getcwd(),'source_file.r') print(tar_fil) if os.path.exists(tar_fil): - rscript_exe = 'C:/Program Files/R/R-4.2.2/bin/Rscript.exe' - rscript_exe = 'Rscript' - print(os.path.exists(rscript_exe)) + rscript_path = 'C:/Program Files/R/R-4.2.2/bin/Rscript.exe' + print(os.path.exists(rscript_path)) + rscript_cmd = 'Rscript' run( - f'{rscript_exe} "{tar_fil}"', + f'{rscript_cmd} "{tar_fil}"', cwd = os.getcwd(), start_new_session = True ) diff --git a/source_file.py b/source_file.py new file mode 100644 index 0000000..9fe9788 --- /dev/null +++ b/source_file.py @@ -0,0 +1,3 @@ +msg = "hello world" + +print(msg) diff --git a/source_file.r b/source_file.r new file mode 100644 index 0000000..597a30c --- /dev/null +++ b/source_file.r @@ -0,0 +1,3 @@ +msg <- "hello world" + +print(msg) |