首页 > 解决方案 > Atom如何运行包含空格的文件

问题描述

我正在尝试使用atom-python-run在 Atom 中运行 python 文件。可悲的是,我的文件存储在名称中包含空格的文件夹中,我无法更改它,因此atom-python-run无法运行此文件。由于我对javascript的了解很少,我试图修复它来改变它:

args.forEach((item, index, arr) => {
                arr[index] = format(item, {
                    'file': editor.buffer.file.path,
                    'dir': info.dir,
                    'name': info.name,
                    'ext': info.ext,
                });
            });

进入这个

args.forEach((item, index, arr) => {
                arr[index] = format(item, {
                    'file': editor.buffer.file.path.split(' ').join('\\ '),
                    'dir': info.dir,
                    'name': info.name,
                    'ext': info.ext,
                });
            });

但是现在当我按 f5 时它什么也不做。有什么方法可以像在其他 python IDE 中一样以非常简单的方式运行文件(也许不使用atom-python-run)?我尝试使用script但不幸的是它不接受输入。

标签: atom-editoratom-plugins

解决方案


推荐阅读