[Edu-sig] What is the Best Way to use Python in the Windows Command Line
csev
csev at umich.edu
Sat Dec 13 15:59:26 CET 2008
I teach a number of classes at the University of Michigan that are
about Python and that use Python. We have gone from no Python
classes last year to five classes and four teachers that teach Python
at UM. We share intro documentation on how to install and set up the
environment.
One thing that really bugs me is that the WIndows Python installer
does not add itself to the Path automatically.
Since I insist that students can be allowed to use Mac's or PCs - I
try to create a similar environment for both and the command line is
the lowest common denominator.
I end up publishing detailed documents and screen casts to get python
into your Windows path. It works but it is not where I want students
energy focused in the first week of class.
I am wondering if there is another way.
I generally do not like IDLE - it uses a socket which can get messed
up, bugs in the student's code seem to mess up the IDE, when a program
needs to open a data file - it is hard to force IDLE into a known
directory.
Is there a way to use an icon and then start the icon an have the
current working directory (i.e. to open data files) be the same
directory as the Python file? And then is there a way to get the
output to stop at the end and not disappear when the program finishes?
I do not like solutions which include adding code to the student
programs to do things like pause before terminating or setting the
current working directory. The students have enough trouble figuring
out the 20 lines of code that matter let alone 5-6 lines of obtuse
code to set up the environment.
I can continue to teach them how to set the PATH variable in Windows -
if anyone on this list has a suggestion - I would much appreciate it.
Thanks.
Charles Severance
University of Michigan
More information about the Edu-sig
mailing list