Skip to content

Add IDLE config option for sys.path additions #106786

Open
@rhettinger

Description

@rhettinger

I work quite a bit with new users running IDLE in Windows.

These users typically do not have the skill to edit Windows environment variables, nor do they typically know how to create a desktop shortcut and then edit its startup directory property.

The startup directory problem is especially irritating because by default IDLE starts up in a hidden path. So any locally created .py files can't easily be found using Windows Explorer. If the users do save new .py files to a new folder on their Desktop, then then can't easily import the files they just made. This makes it difficult when teaching how to import their own modules. This issue can be solved letting IDLE's config specify a startup directory much like MS Word does.

The environment variable issue is also a problem because they often need a temporary PYTHONPATH to point to temporary project directory (which is a typical need in a classroom setting, one directory for instructor provided code and another for their own experiments). This issue can be easily fixed by letting the IDLE configuration have an option for attaching project directories. This could be done by directly manipulating sys.path or by editting the process's PYTHONPATH environment variable (much likeRun ... Customized does for command-line arguments).

Metadata

Metadata

Assignees

Labels

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions