Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spyder is opening bootstrap.py when using "python bootstrap.py" #12313

Closed
ok97465 opened this issue Apr 13, 2020 · 5 comments
Closed

Spyder is opening bootstrap.py when using "python bootstrap.py" #12313

ok97465 opened this issue Apr 13, 2020 · 5 comments
Assignees
Milestone

Comments

@ok97465
Copy link
Contributor

ok97465 commented Apr 13, 2020

Description

What steps will reproduce the problem?

I think that this issue is from #11704.
That PR changed "CLI_OPTIONS, CLI_ARGS = get_options()" to "CLI_OPTIONS, CLI_ARGS = get_options(sys_argv)" of 108 line of mainwindow.py

I am sorry if it was the problem you intended or already knew.
Have a nice day.

bootstrap

Versions

  • Spyder version: 5.0.0.dev0 856a884
  • Python version: 3.7.6
  • Qt version: 5.9.6
  • PyQt5 version: 5.9.2
  • Operating System: Linux 4.15.0-96-generic

Dependencies


# Mandatory:
atomicwrites >=1.2.0        :  1.3.0 (OK)
chardet >=2.0.0             :  3.0.4 (OK)
cloudpickle >=0.5.0         :  1.3.0 (OK)
diff_match_patch >=20181111 :  20181111 (OK)
intervaltree                :  None (OK)
IPython >=4.0               :  7.13.0 (OK)
jedi =0.15.2                :  0.15.2 (OK)
keyring                     :  None (OK)
nbconvert >=4.0             :  5.6.1 (OK)
numpydoc >=0.6.0            :  0.9.2 (OK)
parso =0.5.2                :  0.5.2 (OK)
pexpect >=4.4.0             :  4.8.0 (OK)
pickleshare >=0.4           :  0.7.5 (OK)
psutil >=5.3                :  5.7.0 (OK)
pygments >=2.0              :  2.6.1 (OK)
pylint >=0.25               :  2.4.4 (OK)
pyls >=0.31.9;<0.32.0       :  0.31.9 (OK)
qdarkstyle >=2.8            :  2.8 (OK)
qtawesome >=0.5.7           :  0.7.0 (OK)
qtconsole >=4.6.0           :  4.7.2 (OK)
qtpy >=1.5.0                :  1.9.0 (OK)
rtree >=0.8.3               :  0.9.3 (OK)
sphinx >=0.6.6              :  2.4.4 (OK)
spyder_kernels >=2.0.0dev0  :  2.0.0.dev0 (OK)
watchdog                    :  None (OK)
xdg >=0.26                  :  0.26 (OK)
zmq >=17                    :  18.1.1 (OK)

# Optional:
cython >=0.21               :  0.29.15 (OK)
matplotlib >=2.0.0          :  3.1.3 (OK)
numpy >=1.7                 :  1.18.1 (OK)
pandas >=0.13.1             :  1.0.3 (OK)
scipy >=0.17.0              :  1.4.1 (OK)
sympy >=0.7.3               :  1.5.1 (OK)
@ccordoba12 ccordoba12 changed the title spyder ide open bootstrap.py when using "python bootstrap.py" Spyder is opening bootstrap.py when using "python bootstrap.py" Apr 13, 2020
@ccordoba12 ccordoba12 added this to the Sprint April milestone Apr 13, 2020
@ccordoba12 ccordoba12 self-assigned this Apr 13, 2020
@CAM-Gerlach
Copy link
Member

Thanks for the catch and sorry about that @ok97465 , I did it to save one line of code duplication since if get_options() is called with the default None, which is passed to argparse.parse_args() it will just pull from sys.argv anyway but I forgot that it needs to be sys.argv[1:] or it grabs the name of the script being run, which in this case makes Spyder open it as a file. My mistake, sorry, we could just replace it with that but better to just do it the way @ccordoba12 did to avoid any other issues going forward.

@mrclary
Copy link
Contributor

mrclary commented Apr 14, 2020

@CAM-Gerlach, I agree with you that get_options() is better, since if sys.argv[1:] is used, a file argument could be missed, for example if opening a file when Spyder is not already open.

@ccordoba12
Copy link
Member

Thanks @CAM-Gerlach and @mrclary for your input!

@ok97465
Copy link
Contributor Author

ok97465 commented Apr 14, 2020

@CAM-Gerlach It's ok. Thank you for your hard work on spyder. 👍

@CAM-Gerlach
Copy link
Member

@mrclary Yeah, just too many edge cases that could crop up...I just should have thought of that originally but thanks to you and @ok97465 for your help here! I haven't been working too much on Spyder itself lately, mostly the docs and tutorials with a few PRs here and there as I focus on building an open-source client-server IoT framework designed for field networks of scientific sensors. @ccordoba12 has been the one doing all the hard work as he always does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants