问题描述
我是Atom的新手,并且一般来说都在编码.在我的HND上,我使用了Sublime Text 3,因此请看一下Atom.到目前为止,一切都很好.我决定开始学习Python.我创建了第一个脚本,该脚本只询问用户的姓名和年龄.我已经使用Python的input()函数来请求此信息.
I am new to Atom and coding in general. On my HND I have used Sublime Text 3 so taking a look at Atom.So far, so good.I have decided to start learning Python.I created my first script which just asks a user for their name and age. I have used Pythons input() function to request this information.
我安装了脚本 https://atom.io/packages/script 1.1k
I installed the package Script https://atom.io/packages/script 1.1k
这样可以很好地运行脚本,但无法处理输入.
This ran the script well but couldn’t deal with the input.
我也尝试了许多其他选择,但没有成功.关于如何从Atom内部构建和执行脚本的任何想法.我不介意它是否只是保存脚本并最小程度地打开了Pythons IDLE.
I have also tried a number of other options but havn’t had any success.Any ideas how to build and execute scripts from within Atom. I don’t mind if it just simply saved the script and opened Pythons IDLE at a minimun.
我认为距离构建这样的东西还有很长的路要走.
I think I am a long way of from being able to build such a thing.
(可能在将来的某个时间)
(maybe sometime in the future)
推荐答案
脚本运行器可以运行脚本并支持输入,这与脚本不同.这是我所知道的最简单的完整终端程序包.要运行脚本,请按 +
Script Runner can run scripts and supports input, unlike Script. It's the simplest full terminal package that I know of. To run a script, press +
这篇关于在Atom中运行python输入用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!