[Tutor] Help Noob Question

Mark Lawrence breamoreboy at yahoo.co.uk
Fri Mar 28 11:09:10 CET 2014


On 28/03/2014 01:17, 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.

The point is you type it once and then rerun the command from the run 
prompt.  How can anything be easier?

> On my system that means typing something like:
>
> C:\Documents and Settings\alang\Desktop
>
> 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.
>


-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com




More information about the Tutor mailing list