[Edu-sig] What is the Best Way to use Python in the Windows Command Line

Massimo Di Pierro mdipierro at cs.depaul.edu
Sat Dec 13 17:23:27 CET 2008


I do not know if this is helpful but the web2py windows distribution  
includes portable python and does not require installation. You just  
type

     web2py.exe -S  admin

and you have a python shell or you can do

     web2py.exe -S admin -R /path/to/yourfile.py

It includes Tk all standard python libraries.
There are have some bonus features that students may find convenient  
like browser based editor with syntax highlighting, wysiwyg editor  
for HTML files and easy to use database API.

Massimo


On Dec 13, 2008, at 9:48 AM, Igor Támara wrote:

> Hi, maybe for the first weeks use crunchy, install a server
> somewhere, so they can use it, when you go further on the semester
> you can get them involved in the cli.
>
> Is a shame that advanced tools on the cli are hidden for people from
> GUI ones.   Their minds will be "expanded" when they start to use
> the cli.
>
> Another way is to allow a machine with ssh for your students, so
> they are able to use say ajaxterm or something like that to start
> coding, they will be involved in having an account on a remote
> machine that holds they work.  It turns interesting for people that
> are only used to "just" a PC(or MAC), without knowing the power of
> remote connections and the concept to **share** resources(machines
> and materials) and publish(public_html) their work. Well, if it's
> possible to setup a revision control system, on more courses, they
> will start to appreciate powerful tools, maybe the most advanced
> would be able to get in touch with many interesting things.
>
> My high school students started to use subversion and they got
> really involved and motivated when they saw graphics that showed
> their commits :)
>   http://www.gfc.edu.co/repositorio/2008/
>
> They have just finished their work now, but you can see a show of
> the work done of one of them on
>   http://www.gfc.edu.co/~danmar/
>
> He used visual python, pygame, curses and had a lot of fun coding...
>
> Finally, an option would be to have a linux(livecd) where the cli is
> really friendly where they have all the necessary packages without
> the hazzle of administering viruses and unpredictable results...
>
> P.D:We use Debian Linux at our school, and administration is really
> painless.  Some of the students know how to install it, and have it
> also at their homes.  This is a ongoing work that will reach its
> 10th aniversary ;)  They start to use linux from 6 years old...
>
> csev> I teach a number of classes at the University of Michigan  
> that are
> csev> about Python and that use Python.    We have gone from no Python
> csev> classes last year to five classes and four teachers that  
> teach Python
> csev> at UM.  We share intro documentation on how to install and  
> set up the
> csev> environment.
> csev>
> csev> One thing that really bugs me is that the WIndows Python  
> installer
> csev> does not add itself to the Path automatically.
> csev>
> csev> Since I insist that students can be allowed to use Mac's or  
> PCs - I
> csev> try to create a similar environment for both and the command  
> line is
> csev> the lowest common denominator.
> csev>
> csev> I end up publishing detailed documents and screen casts to  
> get python
> csev> into your Windows path.  It works but it is not where I want  
> students
> csev> energy focused in the first week of class.
> csev>
> csev> I am wondering if there is another way.
> csev>
> csev> I generally do not like IDLE - it uses a socket which can get  
> messed
> csev> up, bugs in the student's code seem to mess up the IDE, when  
> a program
> csev> needs to open a data file - it is hard to force IDLE into a  
> known
> csev> directory.
> csev>
> csev> Is there a way to use an icon and then start the icon an have  
> the
> csev> current working directory (i.e. to open data files) be the same
> csev> directory as the Python file?  And then is there a way to get  
> the
> csev> output to stop at the end and not disappear when the program  
> finishes?
> csev>
> csev> I do not like solutions which include adding code to the student
> csev> programs to do things like pause before terminating or  
> setting the
> csev> current working directory. The students have enough trouble  
> figuring
> csev> out the 20 lines of code that matter let alone 5-6 lines of  
> obtuse
> csev> code to set up the environment.
> csev>
> csev> I can continue to teach them how to set the PATH variable in  
> Windows -
> csev> if anyone on this list has a suggestion - I would much  
> appreciate it.
> csev>
> csev> Thanks.
> csev>
> csev> Charles Severance
> csev> University of Michigan
> csev> _______________________________________________
> csev> Edu-sig mailing list
> csev> Edu-sig at python.org
> csev> http://mail.python.org/mailman/listinfo/edu-sig
>
> -- 
> Recomiendo Inkscape para hacer gráficos vectoriales
> http://www.inkscape.org<signature.asc><ATT00001.txt>



More information about the Edu-sig mailing list