[Tutor] Help Noob Question

spir denis.spir at gmail.com
Fri Mar 28 10:28:27 CET 2014


On 03/28/2014 02:17 AM, Alan Gauld wrote:
> On 27/03/14 21:01, Chris “Kwpolska” Warrick wrote:
>> On Mar 27, 2014 8:58 PM, "Alan Gauld" <alan.gauld at btinternet.com
>> <mailto:alan.gauld at btinternet.com>> wrote:
>>  >
>>  > On 27/03/14 06:43, Leo Nardo wrote:
>>  >>
>>  >> Im on windows 8 and i need to open a file called string1.py that is on
>>  >> my desktop,
>>  >
>>  >
>>  > Thats your first problem. Its usually a bad idea to store your python
>> code on the desktop, because the desktop is a pain to find from a
>> command line.
>>
>> Painful? How painful can `cd Desktop` be? Certainly less than `D:`
>> followed by `cd PythonProjects`…
>
> Because the desktop is hardly ever anywhere near where the cmd prompt lands you.
>
> So cd desktop usually results in an error and typing the full path (even with
> directory completion, Mark) is a royal pain because
> you have to remember where it is. There is no ~ shortcut in Windows.
> On my system that means typing something like:
>
> C:\Documents and Settings\alang\Desktop

Can't you make a symlink pointing to Desktop? (in C:\ or anywhere else)

> or some such nonsense, complete with spaces in the path that add
> to the pain.
>
> Now I probably could use something like cd %HOMEPATH% to get to what Windows
> laughingly considers my 'home' directory and then find it
> from there but even so its not always obvious depending on the
> windows version and the install options used. And of course if
> the file happens to be on the "all users" Desktop looking in my
> local Desktop doesn't help.
>
> I find it much easier to know where my Python code lives from wherever I happen
> to find myself in the labrynthian file system that is Windows.

Well, all filesystems are labyrinthians, AFAIK (at least, for people like me who 
cannot learn by heart). I never know where things are are, in my box (Linux), 
apart from my own home.

d



More information about the Tutor mailing list