ioquatix / script-runner

This package will run various script files inside of Atom. It currently supports JavaScript, CoffeeScript, Ruby, and Python. You can add more.
http://atom.io/packages/script-runner
Other
62 stars 23 forks source link

Pty.js and access to stdin. #52

Closed huba closed 7 years ago

huba commented 7 years ago

We do however lose the ability to pipe unsaved buffers into the stdin of the interpreter, to deal with that I added a save dialog that automatically pops up if the run event is triggered on an unsaved buffer.

Also we no longer need the python script to wrap the pty.

ioquatix commented 7 years ago

I think it's good idea to use pty.js in any case the python script wrapper was a hack to make things work can you merge this once you are happy with it

ioquatix commented 7 years ago

I've added a few comments. The main one would be running scripts which aren't saved.

ioquatix commented 7 years ago

If you have time it could be great to try and finish this off.

huba commented 7 years ago

How about saving it wherever os.tmpdir points then blowing it away after it has finished running? For now anyway...

With this we would of course have to avoid using editor.savebuffer (or whatever) to stop the editor from recognising that the buffer is an actual file on disk.

ioquatix commented 7 years ago

@huba Thanks for all your hard work on this and discussing the ideas. 2.0.0 is now released, and this PR has been largely integrated in one way or another.