atom-community / atom-community/atom-script

running a selection uses a different path than runnning the whole file

Open
#2,160 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
730
Forks
264
PR merge metrics
No merged PRs in 30d

Description

When I run a the whole file with the script package, the location of the file is in the path used. But when I run script on a selection of the file, its location is not in the path. As an example, compare the output of the code below when running the whole file vs running all lines selected.

```
import sys
print(sys.path)
```

This is particularly problematic when working with local packages, which won't be imported.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.