Re: [Tutor] python books

2009-04-14 Thread wesley chun
I am new in python , so need a good books , previously read python Bible and swaroop but not satisfied . so tell me good books in pdf format those contents good problems also if you like a conversational style and know at least one programming language, i've written a pretty popular book

Re: [Tutor] How to write server which listens to specific port

2009-04-14 Thread Alan Gauld
ShivKumar Anand shiv_...@hotmail.com wrote My problem is I dont know how to send/receive a file using socket. How to get the filename specifically. Could you use ftp? There is an ftp module. You need to work out what you want to do over this connection and choose the appropriate

Re: [Tutor] path to executing .py file

2009-04-14 Thread Alan Gauld
tiefeng wu iceberg...@gmail.com wrote is there some way to get path to my executing script, so I can replaced os.getcwd() in above line? Look at the recent thread on creating exe files with py2exe. Investigate the __file__ variable... shutil.rmtree(svn_repos_copy_dir) I got error Access

Re: [Tutor] python books

2009-04-14 Thread Alan Gauld
sudhanshu gautam sudhanshu9...@gmail.com wrote I am new in python , so need a good books , previously read python Bible and swaroop but not satisfied . so tell me good books in pdf format those contents good problems also Does it have to be in PDF? There are many, many excellent Python web

Re: [Tutor] Trouble understanding modifying parent class..

2009-04-14 Thread Alan Gauld
Eric Dorsey dors...@gmail.com wrote class A: def __init__(self, name, value=1): self.name = name self.value = value And now I want a subclass, one that overrides the value=1 and defaults to value=2, how do I code that? I'm understanding subclasses that have different methods

[Tutor] problem with a simple logger with RotatingFileHandler

2009-04-14 Thread Daniel
hi list, I write a simple logger, which follows the example on http://docs.python.org/library/logging.html, as this: def get_logger(log_filename): my_logger = logging.getLogger(MyLogger) my_logger.setLevel(logging.debug) handler = logging.handlers.RotatingFileHandler(log_filename,

[Tutor] help

2009-04-14 Thread j mercedes
hi, its me again jay, thanks alot everyone for your input on the last program i created that solved for the mode,mean, and average of a set of numbers it actually worked great..if anyone can give me any ideas on this program i am doing now it would be appreciated.I keep would like to

Re: [Tutor] How to write server which listens to specific port

2009-04-14 Thread Kent Johnson
On Mon, Apr 13, 2009 at 10:59 PM, ShivKumar Anand shiv_...@hotmail.com wrote: Thanks Kent for this valuable information. My problem is I dont know how to send/receive a file using socket. How to get the filename specifically. Where does the file name come from? Do you ask the user? Is it

Re: [Tutor] problem with a simple logger with RotatingFileHandler

2009-04-14 Thread Sander Sweers
2009/4/14 Daniel daniel.chaow...@gmail.com: def get_logger(log_filename):     my_logger = logging.getLogger(MyLogger)     my_logger.setLevel(logging.debug) ^^^ You have a small typo. This should be in capitals, logging.DEBUG. Greets Sander

[Tutor] python dictionary

2009-04-14 Thread sudhanshu gautam
I was reading about the python dictionaries had finished some methods related to the dictionary. we used get and setdefault methods to get the value from the dictionary if it lies inside it and setdefault used to set the value is side the dictionary if it does not lies inside the dictionary.

Re: [Tutor] python dictionary

2009-04-14 Thread bob gailer
sudhanshu gautam wrote: I was reading about the python dictionaries That is a good thing to do. had finished some methods related to the dictionary. No comprehend. we used get and setdefault methods to get the value from the dictionary if it lies inside it and setdefault used to set the

Re: [Tutor] python dictionary

2009-04-14 Thread Alan Gauld
sudhanshu gautam sudhanshu9...@gmail.com wrote and setdefault used to set the value is side the dictionary if it does not lies inside the dictionary. so why we use setdefault I think in place of setdefault first we should convert that dictionary in the list and now we can add new value then

[Tutor] oops concepts

2009-04-14 Thread sudhanshu gautam
are there any Links by which I can get good knowledge in OOPS . I want to go with good problems in OOPS so tell ,me any good book or link of oops concepts ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] python books

2009-04-14 Thread Ian Egland
I know it's not in PDF, but I thought it would be worth mentioning Python for Software Design: How to Think Like a Computer Scientisthttp://www.greenteapress.com/thinkpython/index.html. I discovered this exactly a week after it was released, ordered it, and have been extremely happy with it so

Re: [Tutor] oops concepts

2009-04-14 Thread Alan Gauld
sudhanshu gautam sudhanshu9...@gmail.com wrote are there any Links by which I can get good knowledge in OOPS . Try the cetus links web site. Also google and wikipedia will throw up lots of sites. I want to go with good problems in OOPS so tell me any good book or link of oops concepts

[Tutor] sorting file paths made up of of strings and numbers

2009-04-14 Thread عماد نوفل
Hi tutors, How can I sort the following list in a way that takes care of the right order of numbers? The sorted function compares strings here as far as I can see, but I want to have filepath2 follow filepath1. Your help is appreciated. myList ['filepath54', 'filepath25', 'filepath49',

Re: [Tutor] sorting file paths made up of of strings and numbers

2009-04-14 Thread wesley chun
How can I sort the following list in a way that takes care of the right order of numbers? The sorted function compares strings here as far as I can see, but I want to have filepath2 follow filepath1. Your help is appreciated. myList ['filepath54', 'filepath25', 'filepath49', 'filepath0',

Re: [Tutor] sorting file paths made up of of strings and numbers

2009-04-14 Thread عماد نوفل
On Tue, Apr 14, 2009 at 8:10 PM, wesley chun wes...@gmail.com wrote: How can I sort the following list in a way that takes care of the right order of numbers? The sorted function compares strings here as far as I can see, but I want to have filepath2 follow filepath1. Your help is

Re: [Tutor] sorting file paths made up of of strings and numbers

2009-04-14 Thread Kent Johnson
2009/4/14 Emad Nawfal (عماد نوفل) emadnaw...@gmail.com: Hi tutors, How can I sort the following list in a way that takes care of the right order of numbers? The sorted function compares strings here as far as I can see, but I want to have filepath2 follow filepath1. Your help is appreciated.

Re: [Tutor] sorting file paths made up of of strings and numbers

2009-04-14 Thread Bill Campbell
On Tue, Apr 14, 2009, Emad Nawfal ( ) wrote: Hi tutors, How can I sort the following list in a way that takes care of the right order of numbers? The sorted function compares strings here as far as I can see, but I want to have filepath2 follow filepath1. Your help is

Re: [Tutor] path to executing .py file

2009-04-14 Thread tiefeng wu
is there some way to get path to my executing script, so I can replaced os.getcwd() in above line? Look at the recent thread on creating exe files with py2exe. Investigate the __file__ variable... thanks, Alan Gauld. thanks for your patience for such a trivial question:)