IDLE 1.0 on Windows

Discussion in 'Python' started by Andrew Gregory, Oct 15, 2003.

  1. 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.
     
    Andrew Gregory, Oct 15, 2003
    #1
    1. Advertising

  2. Andrew Gregory wrote:

    > 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


    --
    Gaudi systems architecting:
    http://www.extra.research.philips.com/natlab/sysarch/
     
    Gerrit Muller, Oct 16, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bartolomé Sintes Marco

    Windows Python 2.3b2 bug? Edit with IDLE

    Bartolomé Sintes Marco, Jul 10, 2003, in forum: Python
    Replies:
    0
    Views:
    319
    Bartolomé Sintes Marco
    Jul 10, 2003
  2. Matthew Wilson

    Tk windows in w2k IDLE don't close

    Matthew Wilson, Oct 9, 2003, in forum: Python
    Replies:
    1
    Views:
    321
    vincent wehren
    Oct 10, 2003
  3. Rolf Wester

    C STDOUT -> IDLE? (Windows)

    Rolf Wester, Nov 6, 2003, in forum: Python
    Replies:
    2
    Views:
    321
    vincent wehren
    Nov 6, 2003
  4. Fuzzyman
    Replies:
    0
    Views:
    348
    Fuzzyman
    Dec 22, 2003
  5. Fuzzyman

    IDLE not working under windows.....

    Fuzzyman, Jan 6, 2004, in forum: Python
    Replies:
    0
    Views:
    312
    Fuzzyman
    Jan 6, 2004
Loading...

Share This Page