将原子与氢一起使用.Atom的工作目录是当前文件位置之后的一个文件夹.如何将其更改为当前文件夹? [英] Using Atom with Hydrogen. The working directory for Atom is one folder up from the current file's location. How do i change it to the current folder?

查看:54
本文介绍了将原子与氢一起使用.Atom的工作目录是当前文件位置之后的一个文件夹.如何将其更改为当前文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Hydrogen和使用插件终端平台的情况下,默认目录都是我的代码文件所在的文件夹.

In both Hydrogen and using a plug-in terminal platform, the default directory is one folder up from where my code file resides.

例如,我将处理一个具有路径的文件,例如 parent/code/file.py .当我在插件的终端中运行 pwd 或通过python脚本中的Hydrogen运行等效命令时,我会得到 parent/,但我需要它成为 parent/code/导入文件等.

E.g., I’ll be working on a file with path, say, parent/code/file.py. When I run pwd in the plug-in's terminal or the equivalent via Hydrogen in the python script I get parent/, but I need it to be parent/code/ to import files etc.

也许Atom的默认目录是该项目,它是打开的项目的文件夹?

Perhaps the default directory for Atom is the project that is folder of the project that is open?

有什么想法如何将Atom的默认当前目录(或其特定于软件包)更改为我正在Hydrogen中处理/执行的文件?

Any ideas how to change the default current directory for Atom (or is it package specific) to the file i’m working on/executing in Hydrogen?

推荐答案

在氢气设置中,您可以选择启动内核的位置.

In the hydrogen settings you can choose the location where the kernel should be started.

默认值为首次启动项目的目录".您可以在此处选择文件的当前目录",这将为您提供所需的内容.

The default is the 'First started project's directory'. You can choose 'Current directory of the file' there, which should give you what you want.

这篇关于将原子与氢一起使用.Atom的工作目录是当前文件位置之后的一个文件夹.如何将其更改为当前文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆