IDLE 1.0 on Windows

A

Andrew Gregory

IDLE puts its configuration info. in a directory called .idlerc
On running it looks for this directory on a path given by the HOME
environment variable.

On Windows HOME would only exist if the user has created it. If it is
not there, IDLE defaults to the highest-lettered hard drive. This
often will be a network drive and is not a good choice. If the drive
is read only (which is quite possible) IDLE fails.

Here are a few extra lines to go in configHandler.h function
GetUserCfgDir to solve this. This allows an IDLERC environment
variable to be used.

def GetUserCfgDir(self):
"""
Creates (if required) and returns a filesystem directory for
storing
user config files.
"""
cfgDir='.idlerc'
if string.find(os.environ['os'].upper(),'WIN')>-1:
userDir=os.getenv('IDLERC')
if userDir==None: userDir=os.getenv('HOME') # may omit,
given later
if userDir==None: userDir="C:\\Python23"
if not os.path.exists(userDir): useDir=os.getcwd()
else:
userDir=os.path.expanduser('~') # unix

[snip]

Andrew.
 
G

Gerrit Muller

Andrew said:
IDLE puts its configuration info. in a directory called .idlerc
On running it looks for this directory on a path given by the HOME
environment variable.

How unfortunate. My windows 98 machine crashes in a horrible way, when
directory or file names start with a dot. I think that I even submitted
a bug report for idle 0.9.2a. Any directory or file name is OK, as long
as it does _not_ contain a .(dot).

I will file a bug report (I thought that I did, but I don't see it at
Sourceforge).

regards Gerrit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,184
Latest member
ZNOChrista

Latest Threads

Top