ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-Tutor
python-Tutor
Re: maint@20974 or before broke mp2 ithreads test
by Marcus Holland-Moritz other posts by this author
Sep 2 2003 10:21PM messages near this date
Re: [Tutor] for x in myClass | [Tutor] WxArt2d
>  1. How do you set the PATH environment variable for python under
windows 98

Look it up in the Windows Help file for full info. But basically you
add a line in your C:\AUTOEXEC.BAT file that looks like:

PATH=%PATH%;C:\PYTHON

or wherever you installed Python....

>  (So that I can import modules which aren't located in the same
folder as
>  python itself)

 However to access modules you really need the PYTHONPATH calue set
which is similarly in AUTOEXEC.BAT but looks like:

SET PYTHONPATH=C:\PROJECTS\PYTHON

or wherever you keep you modules

>  If I just double click on a python script. It automatically executes
under
>  the DOS interpreter, and then closes itself too quickly to see what
the
>  results were. Is it possible to change this?

There are several ways. They all have their own advantages:

1) Add a line like

raw_input("Hit Enter to quit")

at the end of your program.

2) Modify the action associated with opening a Python file using
Windows
explorer so that the interpreter is called with the -i flag set. This
will make
your program run then stop in the interpreter at the > >> prompt.

3) Create a shortcut to the file and then set it to leave the window
open
on completion - only sensible if you ruin the same program a lot.

Personally I tend to use the first option.

HTH,

Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld



(That is, make it so that the
>  program doesn't automatically close the DOS Prompt after its
finished
>  executing, or get it to automatically execute under the Windows
IDLE)
> 
>  *****A Network is the Opposite of a Hierachy*****
> 
> 
> 


_______________________________________________
Tutor maillist  -  Tutor@[...].org
http://mail.python.org/mailman/listinfo/tutor
Thread:
Stas Bekman
Marcus Holland-Moritz
Jarkko Hietaniemi
Marcus Holland-Moritz
Jarkko Hietaniemi
Marcus Holland-Moritz
Jarkko Hietaniemi
Stas Bekman
Stas Bekman
Jarkko Hietaniemi

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved