On 28/03/14 15:27, Chris “Kwpolska” Warrick wrote:
On Fri, Mar 28, 2014 at 2:17 AM, Alan Gauld <alan.ga...@btinternet.com> wrote:
Because the desktop is hardly ever anywhere near where the cmd prompt lands
you.
I just tested on my Windows 7 box. It got me to C:\Users\Kwpolska.
`cd Desktop` is enough.
I also tested on a third-party’s XP box. C:\Documents and
Settings\[username]. `cd Desktop`, too (though it’s
locale-dependent).
Does not look far from the desktop, does it?
True when you first open the DOS box, but not after you've been using it
for a while. I usually find I've moved around several folders and even
several disks.
Python) — or possibly some ultra-crazy corporate environments (but you
should not be learning Python there — and if you are working there,
you know how to work with the command line/Windows/source control
already).
Both are true for me, and a large part of why I wouldn't put stuff on
the desktop. For example my desktop was made up of my personal desktop,
the PC all-user desktop and the corporate shared desktop (only when
connected to the corporate network). Knowing which files/icons
belonged to which location was a nightmare.
or just cd %USERPROFILE%. Different drives would make you jump to
%HOMEDRIVE% and then to %HOMEPATH%.
Which is true for files I create but not for other users of the PC or
for shared desktops. And its still a lot to type compared to Unix (~) or
using a drive root.
Can't you make a symlink pointing to Desktop? (in C:\ or anywhere else)
You could, and that would help a little. But the problem on Windows is that
what appears on the Desktop *display* is an amalgam of (up to 3?) different
folders in the file system. So just because you see an icon on the 'desktop'
doesn't mean you actually know which folder it is in.
But, for user-created files, it always goes to %USERPROFILE%/Desktop.
But which user? It may not be me that created the file.
And I may have deliberately copied/saved it to one of
the shared desktops a long time ago and forgotten.
Create a folder on the desktop, or even in the home directory.
I agree a folder is more sensible and avoids the icon overkill but
the OP specifically had his *file* on the desktop.
nicer place than the drive root — and a much modern way to store it
(drive root sounds DOS-y)
I accept that but its still the shortest absolute path to type
on Windows! And if you are a programmer typing is what you wind
up doing a lot of!
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor