Forums

Accidentally Deleted pythonstartup.py

I accidentally deleted pythonstartup.py and everyother file in my directories. Now whe I start python, I receive error Could not open PYTHONSTARTUP IOError: [Errno 2] No such file or directory: '/home/username/.pythonstartup.py'

How can i get the files back? Thanks

Just go to the "Files" tab and create a new file called .pythonstartup.py. Our default one has the following contents, which you can copy/paste into it:

import rlcompleter
import readline
readline.parse_and_bind("tab: complete")