The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

This topic is READ ONLY
mhoyt (1) [Avatar] Offline
#1
I've set up each of my children with a directory in their "My Documents" directory of Windows Vista for them to store their programs as they work through the book this summer. (That way they can each have their own NumGuess.py).

But when they go to save their programs, the default is the Csmilieython25 directory, which is of course shared by all Users on this Vista machine and not where they should be storing programs anyway. Save As lets them navigate to their personal directory, but is a bit of pain.

Is there a way to configure IDLE to have a default directory where it will store the programs?
warren.sande (211) [Avatar] Offline
#2
Re: Default Directory to store programs
On Windows, shortcut icons on the desktop have a "Start in" field where you can set the directory used as the current working directory when the program starts.

So, you could make an IDLE shortcut on each child's desktop, and set the "Start In" field to their personal directory. (Once you make the desktop shortcut, right-click it, got to "Properties", then "General".)

I tried that with IDLE on Vista and Win 7, and id worked for me.

I'm not sure the same trick will work for SPE, which we use later in the book, but you could try it. SPE seems to remember the last place you saved a file, and defaults to that location for the next Save. However, since there is only one instance of SPE installed, it might only remember one "location", not one per user. So that's probably not what you want. They may have to just browse to their own folder. But at least you only have to do that the first time you save each program.

Hope you and your children have fun with the book this summer!

Regards,
Warren Sande