Try PEP 8, Guido's Style Guide:
http://www.python.org/peps/pep-0008.html
Good luck with your boss!
*gina*
-Original Message-
From: Sara Khalatbari [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 13, 2005 11:13 AM
To: Python List
Subject: Codig style: " or """
Hi!
Suppose you're writi
I would start with something like this:
somestring = '/foo/bar/beer/sex/cigarettes/drugs/alcohol/'
somelist = somestring.split('/')
print somelist
This is close to what you seem to want. Good luck.
*gina*
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday,
2) os.listdir "returns a list containing the names of the entries in the
directory", this does include directories in the top level directory.
For the complete listing try os.walk() which "returns a tuple-(dirpath,
dirnames, filenames"
-Original Message-
From: Sean McIlroy [mailto:[EMAIL
Because you can't take the len() of an integer. Try casting a as a str:
b=(1,len(str(a)))[isinstance(a,(list,tuple,dict))]
-Original Message-
From: It's me [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 12, 2005 12:35 PM
To: python-list@python.org
Subject: Why would I get a TypeEror?