-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Automatically executing code at console startup seems broken #126
Comments
@steff456, please take a look at this one. |
I could reproduce this issue, but the problem is coming from spyder-kernels instead of spyder. I'm transfering this issue there. |
@Khris777 I found the error, but please remember that in order to enter code that should be executed automatically when starting a new console it needs to be separated by |
@steff456 Thank you for the advice. I am using the german localization of Spyder and the explanation in the options tells me I have to use commas. EDIT: When adding to autostart using semicolons, it does not work, pandas is not imported. |
Problem Description
In the settings under the IPython tag there is the section "Start" where you can enter code that should be executed automatically when starting a new console.
Apparently the code added there is not properly executed when starting a new console, it seems like only parts of it are executed with a bit of randomness involved:
What steps reproduce the problem?
Add different imports to the Ipython start field in the settings, then start new console. These are my results:
import sys, import os
-> os imported, sys not imported.import sys, import os, import shutil
->os and shutil imported, sys not importedimport os, import shutil, import sys
-> Only os imported, sys and shutil not imported.import random, import numpy, import sys, import os, import shutil
-> everything but sys importedimport pandas as pd,pd.set_option('display.max_columns',25)
-> pandas imported, setting not set (still at default value 0).Generally it seems that mostly
sys
is not imported if it's there while other modules rarely have an issue.My main issue is with pandas being imported but the following
set_option()
-call not being executed.What is the expected output? What do you see instead?
Everything in the autostart field should be imported and executed.
Versions
Dependencies
The text was updated successfully, but these errors were encountered: