Why does Light Table not allow the user to raw-input a string when running a module with the raw_input() function?

413 views
Skip to first unread message

Eliot Cloud

unread,
May 27, 2014, 1:13:59 PM5/27/14
to light-table...@googlegroups.com
Whenever I try to run the following program in Light Table:

str1 = raw_input("Enter anything:")
print "raw_input =", str1

The working indicator in the console appears but never disappears and the user, i.e. myself, is not prompted to "Enter anything" as I expect it to. Why?

Details:
Mac OSX 10.9.3.

Python 2.7.5 (default, Mar  9 2014, 22:15:05)

Chris Granger

unread,
May 27, 2014, 1:22:05 PM5/27/14
to light-table...@googlegroups.com
stdio hasn't been implemented, so there's no where for you to put the input.

Cheers,
Chris.


--
You received this message because you are subscribed to the Google Groups "Light Table Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to light-table-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eliot Cloud

unread,
May 27, 2014, 2:34:15 PM5/27/14
to light-table...@googlegroups.com
Please explain "stdio hasn't been implemented", i.e. what is "stdio" and how do I implement it?


--
You received this message because you are subscribed to a topic in the Google Groups "Light Table Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/light-table-discussion/SqVpquibZA4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to light-table-discu...@googlegroups.com.

Mike Innes

unread,
May 27, 2014, 3:26:06 PM5/27/14
to light-table...@googlegroups.com
When you run in a terminal, you automatically have an input stream, "stdin", and an output, "stdout", collectively "stdio". Anything you type goes into the input stream; when you call "raw_input" it waits for something be turn up in that input stream, reads it and returns the result.

In Light Table there's simply no way (yet) to feed input to your program, so Python will wait in vain for some to turn up. A simple text box which feeds text into Python's input stream would do the trick, but noone's felt the need to implement that yet. You could do it yourself but that might be tricky – I'd suggest storing your "input" into variables or passing it directly into functions instead.

Josh Cole

unread,
Jun 2, 2014, 7:26:31 PM6/2/14
to light-table...@googlegroups.com
It would be good to make the console either contenteditable or a rich input box (or perhaps even its own CM editor instance). Unfortunately, nobody has gotten around to it yet.


On Tuesday, May 27, 2014 12:26:06 PM UTC-7, Mike Innes wrote:
When you run in a terminal, you automatically have an input stream, "stdin", and an output, "stdout", collectively "stdio". Anything you type goes into the input stream; when you call "raw_input" it waits for something be turn up in that input stream, reads it and returns the result.

In Light Table there's simply no way (yet) to feed input to your program, so Python will wait in vain for some to turn up. A simple text box which feeds text into Python's input stream would do the trick, but noone's felt the need to implement that yet. You could do it yourself but that might be tricky – I'd suggest storing your "input" into variables or passing it directly into functions instead.
On 27 May 2014 19:34, Eliot Cloud <eliot...@gmail.com> wrote:
Please explain "stdio hasn't been implemented", i.e. what is "stdio" and how do I implement it?
On Tue, May 27, 2014 at 1:22 PM, Chris Granger <ibd...@gmail.com> wrote:
stdio hasn't been implemented, so there's no where for you to put the input.

Cheers,
Chris.


On Tue, May 27, 2014 at 10:13 AM, Eliot Cloud <eliot...@gmail.com> wrote:
Whenever I try to run the following program in Light Table:

str1 = raw_input("Enter anything:")
print "raw_input =", str1

The working indicator in the console appears but never disappears and the user, i.e. myself, is not prompted to "Enter anything" as I expect it to. Why?

Details:
Mac OSX 10.9.3.

Python 2.7.5 (default, Mar  9 2014, 22:15:05)

--
You received this message because you are subscribed to the Google Groups "Light Table Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to light-table-discussion+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Light Table Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/light-table-discussion/SqVpquibZA4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to light-table-discussion+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Light Table Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to light-table-discussion+unsub...@googlegroups.com.

Bala V

unread,
Jun 20, 2015, 8:57:17 PM6/20/15
to light-table...@googlegroups.com
Any plans of implementing this feature in the near term?.

Kenny Evitt

unread,
Jun 22, 2015, 9:40:12 AM6/22/15
to light-table...@googlegroups.com
Bala – pull requests welcome!
Reply all
Reply to author
Forward
0 new messages