This is a good place for posting questions about programming in python.
However, if you are a newbie, your questions are most likely already
answered. I recommend
searching in this groups archives
reading the python tutorial
http://docs.python.org/tut/tut.html
reading
http://www.byteofpython.inf
try:
x = raw_input("Please enter your name: ")
--
http://mail.python.org/mailman/listinfo/python-list
Yes. You could do:
Python 2.4.2 (#2, Sep 30 2005, 21:19:01)
[GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> fileobj=open('~\myfile.txt','w')
>>> fileobj.write("test")
>>> fileobj.close()
On Windows, for
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Can someone explain to me the output of this simple script? I wonder
why ['test1.txt'] is printed before "files in c:\", and also why None
shows up?
in file test.py:
def main():
print "files in c:\ :%s" % ListFiles("c:\")
def ListFiles(path):
for root,dirs,files in os.