Re: [Tutor] How can I copy files recursively?

2006-07-10 Thread Danny Yoo
> directory structure. Something like: > > source = '/ipodder' > dest = '/foo/bar' > for root, dirs, files in os.walk(source): >for f in files: >os.rename(os.path.join(root, f), os.path.join(dest, f)) A helper function here will be useful. We can simulate something like: find .

Re: [Tutor] printing 00

2006-07-10 Thread Danny Yoo
> I created a function to print the Time object: > > def printTime(time): > print "%d:%d:%d" % (time.hours, time.minutes, > time.seconds) > > However, when I type '00', I get the following: time = Time(12,34.4,00) printTime(time) > 12:34:0 Hi Chris, You'll want to check some of th

[Tutor] printing 00

2006-07-10 Thread Christopher Spears
I'm working on a problem from "How To Think Like A Computer Scientist". I created a Time class: class Time: def __init__(self, hours, minutes, seconds): self.hours = hours self.minutes = minutes self.seconds = seconds I created a

Re: [Tutor] How can I copy files recursively? [Off Topic, AGAIN]

2006-07-10 Thread زياد بن عبدالعزيز الباتلي
This is “Off Topic” regarding the mailing list! On Mon, 2006-07-10 at 22:57 -0500, Dustin J. Mitchell wrote: (altered by Ziyad) > Richard Querin wrote: > > ... > > I was thinking I could do it easily from the linux command line > > (cp -r copies the subfolders out as well) but I can't figure out >

Re: [Tutor] How can I copy files recursively?

2006-07-10 Thread John Fouhy
On 11/07/06, Richard Querin <[EMAIL PROTECTED]> wrote: > I know this is probably a dumb question: > > I've got mp3 files that are downloaded (by ipodder) into individual > subfolders. I'd like to write a quick script to move (not copy) all the mp3 > files in those folders into a single destination

Re: [Tutor] How can I copy files recursively?

2006-07-10 Thread Dustin J. Mitchell
Richard Querin wrote: > I know this is probably a dumb question: > > I've got mp3 files that are downloaded (by ipodder) into individual > subfolders. I'd like to write a quick script to move (not copy) all the > mp3 files in those folders into a single destination folder. I was > thinking I could

[Tutor] How can I copy files recursively?

2006-07-10 Thread Richard Querin
I know this is probably a dumb question:I've got mp3 files that are downloaded (by ipodder) into individual subfolders. I'd like to write a quick script to move (not copy) all the mp3 files in those folders into a single destination folder. I was thinking I could do it easily from the linux command

Re: [Tutor] how to post an event?

2006-07-10 Thread Jeff Peery
Ah, yes it works, thanks. I had previously tried to simply call the function (OnButton1Button() from OnButton2Button()) instead of posting an event but I guess I did this wrong and abandoned the effort assuming that it wouldn't work. Anyhow, I got it working now, thanks again!JeffAlan Gauld <[EMAIL

Re: [Tutor] How to learn messages frim help()?

2006-07-10 Thread 韩宪平
On 7/10/06, Alan Gauld <[EMAIL PROTECTED]> wrote: > > Hi,all.For example,I want learn build-in function TYPE,do help(type) > > and get message as following: > > > > Help on class type in module __builtin__: > > > > class type(object) > > | type(object) -> the object's type > > | type(name, bases,

Re: [Tutor] Splitting

2006-07-10 Thread Alan Gauld
> Example :- > >>> a="43;dsds;d" b=a.split(';') > > Here I encountered the following error :- > > Traceback (innermost last): > File "", line 1, in ? > AttributeError: 'string' object has no attribute 'split' > > Can anybody help on resolving this issue? >>> a="43;dsds;d

Re: [Tutor] How to learn messages frim help()?

2006-07-10 Thread Alan Gauld
> Hi,all.For example,I want learn build-in function TYPE,do help(type) > and get message as following: > > Help on class type in module __builtin__: > > class type(object) > | type(object) -> the object's type > | type(name, bases, dict) -> a new type > | > | Methods defined here: > | > | __c

Re: [Tutor] error: (10054, 'Connection reset by peer')

2006-07-10 Thread Ewald Ertl
Hello! Grady Henry wrote: > Here is a program that I wrote using the first example at 12.2.13 > Examples at the www.python.org website, > > # Import smtplib for the actual sending function > import smtplib > > # Import the email modules we'll need > from email.MIMEText

Re: [Tutor] Splitting

2006-07-10 Thread Terry Carroll
On Mon, 10 Jul 2006, John Fouhy wrote: > On 10/07/06, Abhinav Gaurav <[EMAIL PROTECTED]> wrote: > > John Fouhy <[EMAIL PROTECTED]> wrote: > > > What version of python are you running? > > 1.5.2 is the version. > > Right. Well, you're slightly over 7 years out of date :-) Do you > have the abili