livepython icon indicating copy to clipboard operation
livepython copied to clipboard

is there a simple way to pipe input `<` to the script?

Open srigsby opened this issue 8 years ago • 2 comments

I like the python script.py < input.txt style on occasion

Obvious alternative: work the input file in as an argument, just thought it might be obvious/doable itself :))

doesn't seem to work with 'livepython script.py < input.txt' just as a mention, it opens and steps through to the line with input() but the in isn't ... putting

srigsby avatar Nov 09 '17 23:11 srigsby

not an answer - but the electron may support this need to dig into piping data for electron

https://stackoverflow.com/questions/28946904/piping-data-from-child-to-parent-in-nodejs

ar args = process.argv.slice(2)

if (!args.length) {
  console.log("Usage: livepython [program] [..args]")
  process.exit()
}

args.unshift(__dirname + "/../tracer.py")

johndpope avatar Jun 20 '18 16:06 johndpope

screen shot 2018-06-20 at 12 20 51 pm @roydhenderson created this code - looks like it's piping something to electron app . https://github.com/mrdoomits/superluminous/blob/ad08321b463b6b31730873b08418ee2f2cd6cb28/electron_app/gulpfile.js

(no idea what gulp is)

johndpope avatar Jun 20 '18 16:06 johndpope