You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @eendebakpt, thanks for reporting. Between the two methods mentioned in the SO question you referenced, I think it's safer to use the second one, i.e.
fromIPythonimportget_ipythonshell_cls_name=get_ipython().__class__.__name__ifshell_cls_name=='SpyderShell':
# Do things only for Spyder
...
That's because we're considering to remove all env vars we use to start a kernel (the SPY_* ones mentioned there), but SpyderShell is not going to go away.
Let us know if that's enough for the Spyder support you're trying to add to tqdm (and thanks for taking care of that, by the way).
Problem Description
Is the an "official" way to detect a python session is running as a console inside Spyder?
There are some methods listed in https://stackoverflow.com/questions/53829284/how-to-know-if-a-script-is-running-in-spyder-or-any-other-python-ide, but it is not directly clear whether there is a preferred one.
Also see tqdm/tqdm#1559
The text was updated successfully, but these errors were encountered: