FINAL SOLUTION:
### LOOP OVER DIRECTORY
location = '/Users/spyros/Desktop/3NY8MODELSHUMAN/HomologyModels'
zdata = []
for filename in os.listdir(location):
filename = os.path.join(location, filename)
try:
zdata.extend(extract_zcoord(filename))
except NameError:
print No such file!
except
On Wed, May 30, 2012 at 07:00:30AM +0100, Spyros Charonis wrote:
FINAL SOLUTION:
Not quite. You are making the mistake of many newbies to treat Python
exceptions as a problem to be covered up and hidden, instead of as a
useful source of information.
To quote Chris Smith:
I find it
On Wed, May 30, 2012 at 8:16 AM, Steven D'Aprano st...@pearwood.infowrote:
On Wed, May 30, 2012 at 07:00:30AM +0100, Spyros Charonis wrote:
FINAL SOLUTION:
Not quite. You are making the mistake of many newbies to treat Python
exceptions as a problem to be covered up and hidden, instead of
Hello all,
I am working on learning Python(on my own) and ran into an exercise that I
figured out but I wanted to know if there was a different way to write the
code? I know he wanted a different answer for the body because we haven't
gotten to the ' '.join() command yet.
This is what I have:
Seems like a lot of extra work for joining the strings. You should only
need:
''.join(['very', 'hot', 'day']) (no spaces)
' '.join(['very', 'hot', 'day']) (if you want spaces)
glen
On Wed, May 30, 2012 at 11:21 AM, Akeria Timothy akeriatimo...@gmail.comwrote:
Hello all,
I am working on
On 05/30/2012 12:21 PM, Akeria Timothy wrote:
Hello all,
I am working on learning Python(on my own) and ran into an exercise that I
figured out but I wanted to know if there was a different way to write the
code? I know he wanted a different answer for the body because we haven't
gotten to
On 5/30/2012 12:21 PM, Akeria Timothy wrote:
In addition to the other comments I point out that join is not a
/command/, it is a /string method/. Python does not have commands.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist -
On Wed, 2012-05-30 at 12:21 -0400, Akeria Timothy wrote:
[...]
def joinStrings(stringList):
string = []
indentation error in that the above line and the below line should have
the same indent level. Also the above line and the following line are
both definitions of the variable string so the
A procedural point here: You forgot to include the list, and just
replied to me privately. Normally, what you should do is a Reply-All.
Or else make sure tutor@python.org is one of the To: or CC: list
On 05/30/2012 01:40 PM, Akeria Timothy wrote:
I did copy and paste and I'm learning
Spyros Charonis wrote:
On Wed, May 30, 2012 at 8:16 AM, Steven D'Aprano st...@pearwood.infowrote:
[...]
There is little as painful as a program which prints An error occurred
and then *keeps working*. What does this mean? Can I trust that the
program's final result is correct? How can it be
10 matches
Mail list logo