简体   繁体   中英

Getting Enthought Python IDLE to run code when shell is restarted

I'm running EPD and using IDLE for most of my coding. What I'd like to do is get IDLE to run a script to customize my environment whenever I restart the Python shell. I've tried reading all the various posts on customizing IDLE and the Python environment, and I've yet to see anything that addresses this specific scenario. Does IDLE or EPD IDLE (if there's any difference) have a particular module it's looking for when it restarts the shell, like usercustomize.py or sitecustomize.py? Has anyone accomplished this on their own? Any guidance is appreciated.

Upon startup with the -s option, IDLE will execute the file referenced by the environment variables IDLESTARTUP or PYTHONSTARTUP.

Check out: http://docs.python.org/library/idle.html#startup

Cheers, Johannes

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM