Skip to content

Python print() function does not work properly (under RStudio) #47

Description

@Madpentiste

Python 3 print() function does not print at all (on stdout) when called by py.exec().
It works only if print is directed to a file (not the stdout) with the file=<python_file_object> option
Whatever was printed on stdout during the python session, however, is printed on the R stdout when unloading the SnakeCharmR package.

To reproduce :

library("SnakeCharmR") # this loads python 3.4 on my installation
output:
SnakeCharmR 1.0.7.1 - R and Python Integration
Contribute and submit issues at https://github.com/asieira/SnakeCharmR

Python version 3.4.3 (default, Nov 12 2018, 22:32:28)
[GCC 4.8.4]

py.exec("print('Hello world')")
output: none

unloadNamespace("SnakeCharmR")
output:
Hello world

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions