# calling R from python
import subprocess
import sys

command = 'Rscript'

if __name__ == '__main__':
	path2script = "./simple.R"

	cmd = [command, path2script] + sys.argv[1:]
	print("cmd is %s" %cmd)

	x = subprocess.check_output(cmd, universal_newlines=True)
	print("cmd output is: ")
	print("%s" %str(x))


@@ -95,17 +95,20 @@
 ain__':%0A
-%09
+    
 path2scr
@@ -127,17 +127,20 @@
 ple.R%22%0A%0A
-%09
+    
 cmd = %5Bc
@@ -175,17 +175,20 @@
 rgv%5B1:%5D%0A
-%09
+    
 print(%22c
@@ -204,17 +204,20 @@
  %25cmd)%0A%0A
-%09
+    
 x = subp
@@ -266,17 +266,20 @@
 s=True)%0A
-%09
+    
 print(%22c
@@ -299,9 +299,12 @@
  %22)%0A
-%09
+    
 prin

convert tabs to spaces -.-