How can i start the Python-IDLE from a python script in a way so that all the variables and functions that previously have been declared in the script are than known in the IDLE?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can run IDLE from the command-line using:
Also:
So you could set either $IDLESTARTUP or $PYTHONSTARTUP to a python file with the variables you want to declare, and they will be available from within IDLE when it starts.
You could start IDLE from a Python script this way by using the os.system command (or subprocess.Popen) to run the command above.