[Tutor] Some Questions about Python
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Tue Aug 3 22:35:49 CEST 2004
On Tue, 3 Aug 2004, Ali Polatel wrote:
> 1.Can we delete or create a file with Python?
> 2.Can we rename a file with Python?
Hi Ali,
You may want to look at:
http://www.python.org/doc/lib/os-file-dir.html
The functions os.unlink() and os.rename() should apply to your question.
You may also want to look at some tutorials at:
http://www.python.org/topics/learn/non-prog.html
as these should cover how to do standard input-output in Python.
> 3.How can we restart a computer or shutdown a computer with python?
We actually had some discussion about this yesterday. Here's a link to
the relevant thread:
http://mail.python.org/pipermail/tutor/2004-August/030849.html
Good luck!
More information about the Tutor
mailing list