[Tutor] Windows, Python and me

Steve Arnold sarnold@earthling.net
Sat, 11 Aug 2001 18:34:40 -0700


Roman Suzi wrote:

[snip]


> 1. After installing Python under Windows, I can't just type "python" in
> DOS-prompt to run scripts. What is the easy way for the novice to set PATH
> correctly? ("> start python" works fine).


Add the Python directory to the path in the autoexec.bat file.


> 2. Some tar.gz archives are using LF-line ends (and this is right thing
> for UNIX or under IDLE). However, such scripts are not editable in NotePad
> which is fabulous default Windows editor. What is the better choice:
> to get/provide CR-LF-ed text files or (how?) make users decode text files
> for themselves?
> 
> The deadlock is: NotePad can't be used due to LF-ed py-files and IDLE
> internal editor can't be used because IDLE doesn't support non-latin-1
> chars... I could suggest Emacs, but for beginners... They will be
> pissed off not only for Emacs, but Python alltogether. This way or that
> solution must be "freely distributable".


A really good free editor for win32 is PFE:

http://www.lancs.ac.uk/people/cpaap/pfe/

It's simple yet powerful, and is actually designed with programming 
in mind.  It handles both DOS and *nix style line-endings (and can 
convert between them).  I'm not sure about the license or terms of 
distribution, but an even better programmer's editor would be vim. 
It runs on win32 and has cool stuff like color syntax highlighting.

http://www.vim.org/

Then, as you said, there's emacs.  I'd say one of those three should 
do it.


> 3. What is the preferred way to run setup.py script? (MS DOS prompt
> doesn't work due to the problem no 1 above and if it works, how do I open
> MS DOS prompt in the needed directory and not in the C:\WINDOWS> ? (using
> cd or adding some bat or pif files to the directory with unzipped contents
> is not an option: it makes feel like Python doesn't suit into Windows
> environment well). Or do I need to get some freeware kind of Norton Editor
> for such tasks? (What Windows "Explorer" is for, then?)
> 
> * * *
> 
> I think, these questions have impact on Python usability under Windows.
> Probably, the best solution could be adding GUI to Distutils, so running
> JUST setup.py without options will bring up a dialog with all available
> options or at least a text-prompt for them (like this is done for Mac
> which do not have command line).
> 
> The reason I posted this to Tutor is that probably I need to learn more
> about Windows+Python to resolve problems stated above. And yes, I have
> read Distutils docs. (please, tell if I need to reread them).
> 
> Thank you for answers!
> 
> Sincerely yours, Roman Suzi
>