By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,711 Members | 1,377 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,711 IT Pros & Developers. It's quick & easy.

automatically import modules upon interpreter invocation

P: n/a
Hi folks, this seems like a very basic thing but I couldn't find a solution.
I always do the following after starting the python interpreter (on linux):

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

Is there a way of making python execute the above whenever it starts
up so that I don't have to type it all the time?

Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
Jun 27 '08 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Daniel Fetchinson wrote:
Is there a way of making python execute the above whenever it starts
up so that I don't have to type it all the time?
Create a script containing these statements, and specify its location with
the PYTHONSTARTUP environment variable. Your script will run whenever
python starts.
Jeffrey
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.