[Tutor] Windows, Python and me

Tim Peters tim.one@home.com
Sat, 11 Aug 2001 14:33:02 -0400

[Roman Suzi]
> ...
> 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).

What does "novice" mean to you?  Windows is a GUI environment, and nothing
involving a DOS box is suitable for a true novice (MS barely even documents
that DOS boxes exist).  How to set PATH varies across different flavors of
Windows, and that operation isn't for novices either.  Easiest is to open a
DOS box and explicitly "cd" to the Python directory.

> 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.

I have a sister who still uses Notepad, but she's an extreme case <wink>.

> What is the better choice: to get/provide CR-LF-ed text files or
> (how?) make users decode text files for themselves?

Most Windows users eventually get around to buying WinZip; by default,
WinZip attempts to detect Unixish text files in tar files and convert them
to Windows line end conventions by magic.  But shipping a .tar file (.gz or
not) pretty much rules out Windows novices from the start (Windows users
expect .zip files with Windows line ends -- or a Windows installer).

> ...
> 3. What is the preferred way to run setup.py script?

Until you redefine your target audience, this just gets more and more
hopeless.  If you want to target novices, you have to build a Windows
installer.  InnoSetup is free and easy to use:


> ...
> it makes feel like Python doesn't suit into Windows environment well).

It doesn't, and no more than e.g. Perl does:  command-line programs of any
kind don't fit Windows well.  The Windows audience is overwhelmingly
non-programming end users of GUI apps, and a "power user" in the Windows
world is someone who memorized a keyboard shortcut <0.7 wink>.

If you can assume your target audience is composed of programmers, then you
can assume they've already found solutions they can live with to the kinds
of issues you're raising.