Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

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

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.

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

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?

like image 575
travelingbones Avatar asked Jan 29 '23 14:01

travelingbones


1 Answers

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.

like image 72
Fabian Kirsch Avatar answered Feb 02 '23 22:02

Fabian Kirsch