automatically import modules upon interpreter invocation
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: comp.lang.python
From:
"Daniel Fetchinson" <fetchin... @googlemail.com>
Date: Wed, 25 Jun 2008 01:03:29 -0700
Local: Wed, Jun 25 2008 4:03 am
Subject: automatically import modules upon interpreter invocation
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
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: comp.lang.python
From:
Ken Seehart <k... @seehart.com>
Date: Wed, 25 Jun 2008 01:34:21 -0700
Local: Wed, Jun 25 2008 4:34 am
Subject: Re: automatically import modules upon interpreter invocation
Daniel Fetchinson wrote:
> 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
environment variable PYTHONSTARTUP can be set to a python file that runs when you start the python interpreter - Ken
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: comp.lang.python
From:
"Daniel Fetchinson" <fetchin... @googlemail.com>
Date: Wed, 25 Jun 2008 01:44:16 -0700
Local: Wed, Jun 25 2008 4:44 am
Subject: Re: automatically import modules upon interpreter invocation
>> 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
> environment variable PYTHONSTARTUP can be set to a python file that runs > when you start the python interpreter
Great, thanks! Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: comp.lang.python
From:
Jeffrey Froman <jeff... @fro.man>
Date: Thu, 26 Jun 2008 08:42:46 -0700
Local: Thurs, Jun 26 2008 11:42 am
Subject: Re: automatically import modules upon interpreter invocation
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
You must
Sign in before you can post messages.
You do not have the permission required to post.