Python - 保存在 GNU Nano 2.2.4 中编辑的文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14057924/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-18 10:19:17  来源:igfitidea点击:

Python - Saving a File being edited in GNU Nano 2.2.4

pythonnano

提问by binary101

I'm very new to programming and playing around with a Raspberry Pi and following tutorials on Youtube.

我对编程和使用 Raspberry Pi 以及在 Youtube 上遵循教程非常陌生。

I have opened a file in GNU Nano 2.2.6 e.g: nano my_File.pyand changed some of the data.

我在 GNU Nano 2.2.6 中打开了一个文件,例如:nano my_File.py并更改了一些数据。

I'm struggling on how to overwrite the file (or save it) because when i run it in a new window it uses the original data...

我正在努力研究如何覆盖文件(或保存它),因为当我在新窗口中运行它时,它使用原始数据......

Thanks.

谢谢。

采纳答案by favoretti

If you press Ctrl-X, for exit, it will ask you whether you want to save the file. Ctrl-Ois for saving file without exiting the editor.

如果按Ctrl-X, 退出,它会询问您是否要保存文件。 Ctrl-O用于在不退出编辑器的情况下保存文件。

Ctrl-Gis for help on key combinations.

Ctrl-G是寻求组合键的帮助。