BEGIN.Python() and END.Python don't work

Create issue
Issue #1 on hold
Former user created an issue

Hi there,

I've just started using PythonInR and am excited by the potential utility it offers. Thank you for creating it. The first issue I've run into is that I can't get the following code to run:

BEGIN.Python() py> print("Hello") END.Python

In RStudio is just see the ever present stop sign and it doesn't exit the Python execution and return to R. Help!

Comments (4)

  1. Florian Schwendinger repo owner

    Hi,

    Should be fixed!

    Thank you for the hint. I normal don't use RStudio and there seems to be a difference between the terminal an RStudio when it comes to reading the stdin, but now it works for both.

  2. Florian Schwendinger repo owner
    • changed status to open

    Acctually this is a known RStudio issue, I tried to fix it by switching to readline (does remove leading spaces) which actually made it worse therefore I will switch soon back to readLines. Therfore BEGIN.Python() will not work for RStudio users till following issue is fixed. You can test if it's an PythonInR or RStudio issue be running the following code:

    f <- file("stdin")
    open(f)
    line <- readLines(f, n=1)
    

    Which will crash your RStudio.

  3. Log in to comment