IDLE Default Working Directory

Terry Reedy tjreedy at udel.edu
Mon Nov 12 18:45:32 EST 2018


On 11/12/2018 2:28 PM, eryk sun wrote:
> On 11/12/18, Christman, Roger Graydon <dvl at psu.edu> wrote:
>> eryk sun <eryksun at gmail.com> responded:
>> ________________________________
>> On 11/12/18, Christman, Roger Graydon <dvl at psu.edu> wrote:
>>>
>>> I looked in IDLE's own configuration menu, and didn't see anything there
>>> --
>>> and I fear that I might have to fight some Windows settings somewhere
>>> else
>>> instead.   I think this is Windows 10.
>>
>> Modify the "Start in" field of the IDLE shortcut. You can use
>> environment variables, e.g. "%UserProfile%\Documents".
>>>
>> Unfortunately, since I do not have any administrative privileges, I do not
>> think I have the ability to modify any of these shortcuts.  Nor do I know
>> off hand how to set environment variables in a manner that would work
>> consistently throughout the term, so that they persist for all logins.
> 
> If Python is installed for all users, then the shortcut should be a
> file named like "IDLE (Python 3.x [32|64]-bit).lnk" in the directory
> "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Python 3.x". Copy
> it to the user's desktop, where you'll have the right to modify it. Or
> instead you can just create a new shortcut on the desktop that runs
> "C:\path\to\python\installation\pythonw.exe"
> "C:\path\to\python\installation\Lib\idlelib\idle.pyw".
> 
> As to environment variables to use in "Start in", %UserProfile% is a
> built-in variable for the current user's profile directory; you don't
> have to add it.

On Windows, a simple alternate is a .bat file.  I belive the folloiwing 
should work.

cd c:/desired/startup/directory
py -x.y -m idlelib

The default for x.y is latest 3.x or latest 2.x if no 3.x.


-- 
Terry Jan Reedy




More information about the Python-list mailing list