[Tutor] Fwd: Re: Setting Command Line Arguments in IDLE

Alan Gauld alan.gauld at yahoo.co.uk
Sun May 26 09:26:35 EDT 2019


Oops, Forgot to include the list....!



-------- Forwarded Message --------
Subject: 	Re: Setting Command Line Arguments in IDLE
Date: 	Sun, 26 May 2019 09:03:36 +0100
From: 	Alan Gauld <alan.gauld at yahoo.co.uk>
To: 	Richard Damon <Richard at Damon-Family.org>



On 26/05/2019 02:55, Richard Damon wrote:
> I am working on a python script that will be provided arguments when run
> from the system command line. Is there any place in IDLE to provide
> equivalent arguments for testing while developing in IDLE?
>

There used to be a dialog for that but in the latest version
of IDLE I can't find it. I wonder when it disappeared and why?

The best place to ask is probably on the IDLE-dev list.

It can be found here:

https://mail.python.org/mailman/listinfo/idle-dev

> Is there any way to define the working directory for the program, 

os.getcwd() # read current dir
os.chdir() # set current dir

> If not, is there an easy way to detect that I am running in IDLE so I
> can fake the command line arguments when testing?

Not that I'm aware, but the idle-dev gurus may have some ideas.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



More information about the Tutor mailing list