Calling readline(stdin) inside __init__() freezes


what is the problem with this code?
when I run it, it stops for user input due to readline but as I enter something it freezes.
And when I used Ctrl + C, it showed a warning.

WARNING: Force throwing a SIGINT
module A

    function __init__()
        load = (readline(stdin) === "true") ? true : false
        if load


using .A

Is this in Atom or command line REPL?
It works for me as expected at a command line REPL if I replace === by ==.
AFAIK readline is broken in Atom.


This is in atom.
What else can I use in atom.


Depends on your purpose. readavailable does work for me most of the times, but is less convenient if you want to catch more than one character.


Relevant issue.

Note that you can still use readline, but it’s not very intuitive:


Actually , My problem is that I am not able to use readline() inside __init__().
Outside __init()__ , readline() works fine.
I just want to take an argument from user when I import my custom module is there any other way to do so??