[Tutor] Interaction between Python and Windows?
Paul Sidorsky
paulsid@shaw.ca
Mon, 06 May 2002 11:17:58 -0600
programer@iquebec.com wrote:
> I had a question about the integration of Python with Windows; it
> may be Off-Topic, so I apologize in this case...
>
> When I type "python" at the command prompt in MS-Windows 98
> SE, it starts automatically Python within a DOS-box.
>
> Does anyone know where it comes from, which files are modified (I
> searched the sysedit files and didn't find)? Have you pointers to a
> detailed resource about this topic?
I'm not entirely sure what you mean, so here are a few things:
- It sounds like you're just wondering how Windows knows where to find
Python. The installer probably put Python's directory in your system
path. Go to Start Menu->Run and enter "msconfig". Then under the
Environment tab, look for "PATH" and click Edit, then look for
"c:\python22". Each directory in the path is searched (in order)
whenever you enter a command that can't be found in the current
directory. (The best reference for this is probably an old MS-DOS
manual.)
- If you want a graphical interface to Python, type "python
c:\python22\tools\idle\idle.py". Python should have put an icon for
this in your Start menu, look for "IDLE".
- If you don't want a DOS box to come up when you run Python programs,
either save your scripts with a .pyw extension or (my preference) run
them with "pythonw" instead of "python".
I've assumed you're using Python 2.2 and that you put it in c:\python22.
--
======================================================================
Paul Sidorsky Calgary, Canada
paulsid@shaw.ca http://members.shaw.ca/paulsid/