Open goddessfreya opened 8 years ago
I must also add, before I used the temporary fix, os.chdir() wouldn't change the current working directory and would quietly do nothing. After doing my fix os.chdir() changes the directory even when I start Atom through the shortcut (instead of through command prompt). Sadly to use the 'Current Working Directory' setting I still need to start Atom through command prompt.
Recently I was struggling with changing the working directory of my python program. If 'Current Working Directory' was not empty, trying to run would give an error when trying to be run.
Dependencies: Python 3.5.2
Steps: 1- Insure no other copy of atom is running 2- Open Atom through the shortcut which appears in the Start Menu. (Target: %AppData%..\Local\atom\Update.exe --processStart atom.exe Start In: %AppData%..\Local\atom\app-1.9.1) 3- Press Ctrl-N then type "print("Hi")" into the new file 4- Press Ctrl-S then save it somewhere. 5- Press Ctrl-Shift-B, insure it runs. 6- Press Alt-Ctrl-Shift-O 7- Under 'Current Working Directory' type the relative path to a other directory, in my case that was 'data' 8- Press run. You will get something like this this:
How to fix it: 1- Close all instances of atom 2- Open cmd.exe with elevated permissions. 3- Type 'cd [diorectory where you saved the thing]' then hit enter then type "atom ." then hit enter 4- Open the file you saved 5- Press Ctrl-Shift-B, insure it runs. 6- Press Alt-Ctrl-Shift-O 7- Under 'Current Working Directory' type the relative path to a other directory, in my case that was 'data' 8- Press run, now it will work.