REPOST: Re: Finding out that Python is in interactive mode in sitecustomize.py

Syver Enstad syver-en+usenet at online.no
Sat Dec 29 10:12:47 EST 2001


Joonas Paalasmaa <joonas at olen.to> writes:

> How can I find out that Python is started in interactive mode in
> sitecustomize.py ?
> The need for that information is, that I want that certain
> customizations take place only at
> interactive mode.

If you just need special setup for interactive mode you could do as I
do and define the environment variable PYTHONSTARTUP to some python
file. The file refered to will be executed only when you're starting
python interactively.

-- 

Vennlig hilsen 

Syver Enstad

========= WAS CANCELLED BY =======:
Path: news.sol.net!spool1-nwblwi.newsops.execpc.com!newsfeeds.sol.net!news-out.visi.com!hermes.visi.com!out.nntp.be!propagator-SanJose!in.nntp.be!news-in-sanjose!news-xfer.nuri.net!feeder.kornet.net!news1.kornet.net!ua4canc3ll3r
From: Syver Enstad <syver-en+usenet at online.no>
Newsgroups: comp.lang.python
Subject: cmsg cancel <u1yhekqkw.fsf at online.no>
Control: cancel <u1yhekqkw.fsf at online.no>
Date: Mon, 31 Dec 2001 03:55:09 GMT
Organization: A poorly-installed InterNetNews site
Lines: 2
Message-ID: <cancel.u1yhekqkw.fsf at online.no>
NNTP-Posting-Host: 211.57.49.2
X-Trace: news2.kornet.net 1009774739 27193 211.57.49.2 (31 Dec 2001 04:58:59 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 04:58:59 +0000 (UTC)
X-No-Archive: yes
X-Unac4ncel: yes
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)

This message was cancelled from within Mozilla.



More information about the Python-list mailing list