Re: [Tutor] Need help wrapping my head around duck typing

2011-05-24 Thread Cory Teshera-Sterne
end([os.path.join(monpath,file) for file in files]) filepaths.sort() return filepaths On Tue, May 24, 2011 at 10:37 PM, Wayne Werner wrote: > On Tue, May 24, 2011 at 9:17 PM, Cory Teshera-Sterne > wrote: > >> Hello, >> >> Thanks for the input. I guess you&#x

Re: [Tutor] Need help wrapping my head around duck typing

2011-05-24 Thread Cory Teshera-Sterne
tion in your proposed >> solutions? It probably will, so it is probably best to go for >> try-except-finally clauses. >> >> A sidenote: personnally I would glob the directory and then sort the list >> by file creation date. >> >> Kind regards, >> &

[Tutor] Need help wrapping my head around duck typing

2011-05-24 Thread Cory Teshera-Sterne
Hi folks, Coming from a language background that has a different approach to variables (*cough* Java *cough*), I'm trying to understand Python's typing conventions and how to deal with unknown variable types in my code. And as a newbie, I'm really concerned with not writing code that will make the

[Tutor] Evaluating program running time?

2011-04-08 Thread Cory Teshera-Sterne
le, but that doesn't seem to be quite what I'm looking for. Thanks for any insight, Cory -- Cory Teshera-Sterne Mount Holyoke College, 2010 www.linkedin.com/in/corytesherasterne ___ Tutor maillist - Tutor@python.org To unsubscribe o

[Tutor] Consequences of opening subprocesses?

2010-11-26 Thread Cory Teshera-Sterne
Hi all, I'm practicing python by rewriting some bash scripts, and I've found a few things that I can't directly translate, like certain calls to command-line tools. I've figured out how to start them with the subprocess module, but I'm wondering if I'm going to get myself in hot water memory- or p