foreshadow / atom-python-run

A simple atom package. Press one key to run your python code in atom.
https://atom.io/packages/atom-python-run
MIT License
43 stars 32 forks source link

Cant run file from SD card because of path problem #125

Open itvexesme opened 4 years ago

itvexesme commented 4 years ago

Hey. Found the following bug with python file launch by atom-python-run. I opened python file in Atom with atom-python-run from SD card named Mac SDXC. Its located by /Volumes/Mac SDXC path. When I try to launch file by F5 key, I got the following error:

/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/Volumes/Mac': [Errno 2] No such file or directory

Process returned 2 (0x2)    execution time : 0.035 s
Close this window to continue...

Execution command in console was:

python /Users/username/.atom/packages/atom-python-run/lib/../cp/main.py --pause -- python /Volumes/Mac SDXC/scripts/test.py

But for successful launch it should be:

python /Users/username/.atom/packages/atom-python-run/lib/../cp/main.py --pause -- python /Volumes/Mac\ SDXC/scripts/test.py

Note: need to add \ symbol before space. Please fix that if possible. Thanks.

OscarWan commented 4 years ago

Meet the same problem on Mac OS. I once used sublime REPL and it can automatically add \ before the space when reading the path. Hope it could be fixed!