[Tutor] Setting Command Line Arguments in IDLE

Alex Kleider akleider at sonic.net
Sun May 26 10:19:11 EDT 2019


On 2019-05-25 18:55, Richard Damon wrote:
> 
> Is there any way to define the working directory for the program, or
> will it always be the directory the script is in (it will be typically
> run using the PATH, so not the same directory as the script)?

import os
cwd = os.getcwd()
os.chdir(path)

Sorry, can't help you re Idle.


More information about the Tutor mailing list