[Tutor] Move all files to top-level directory

Dotan Cohen dotancohen at gmail.com
Tue Apr 13 09:20:59 CEST 2010

>> I see, thanks. So I was sending it four values apparently. I did not
>> understand the error message.
> No, you're sending it two values:  a tuple, and a string.  It wants two
> strings.  Thus the error. If you had sent it four values, you'd have gotten
> a different error.

I see. For some reason I was thinking that the tuple was just three
strings. I've slept now and it is clear to me that this is not the

>>> It might be wise to only have this module print what it would do
>>> instead of doing the actual move/rename so you can work out the bugs
>>> first before it destroys your data.
>> I am testing on fake data, naturally.
> Is your entire file system fake?  Perhaps you're running in a VM, and don't
> mind trashing it.
> While debugging, you're much better off using prints than really moving
> files around.  You might be amazed how much damage a couple of minor bugs
> could cause.

I know that you are right. However, using prints would not have helped
me in my current case of not fully understanding the os.rename
function. I should probably develop as a different user, though, to
prevent "incidents". Thanks for the advice.

Dotan Cohen


More information about the Tutor mailing list