Re: [Tutor] difference between super() and parent.__init__()?

2011-10-22 Thread Steven D'Aprano
Alex Hall wrote: On 10/21/11, Steven D'Aprano st...@pearwood.info wrote: [...] The one exception to this is if your class changes the method signature. E.g. if A.method takes no arguments, but B.method requires an argument. super cannot help you now. But changing the signature of methods is

[Tutor] how to unique the string

2011-10-22 Thread lina
Hi, I googled for a while, but failed to find the perfect answer, for a string ['85CUR', '85CUR'] how can I unique it as: ['85CUR'] Thanks, ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] how to unique the string

2011-10-22 Thread Devin Jeanpierre
You should be able to do this yourself, with the help of the following link: http://docs.python.org/library/stdtypes.html#set Is this a homework question? Devin On Sat, Oct 22, 2011 at 12:09 PM, lina lina.lastn...@gmail.com wrote: Hi, I googled for a while, but failed to find the perfect

Re: [Tutor] how to unique the string

2011-10-22 Thread bob gailer
On 10/22/2011 12:09 PM, lina wrote: Hi, I googled for a while, but failed to find the perfect answer, for a string ['85CUR', '85CUR'] how can I unique it as: ['85CUR'] Try set(['85CUR', '85CUR'] -- Bob Gailer 919-636-4239 Chapel Hill NC ___

Re: [Tutor] how to unique the string

2011-10-22 Thread Steven D'Aprano
lina wrote: Hi, I googled for a while, but failed to find the perfect answer, for a string ['85CUR', '85CUR'] That's not a string, it is a list. how can I unique it as: ['85CUR'] Your question is unclear. If you have this: ['85CUR', '99bcd', '85CUR', '85CUR'] what do you expect to

Re: [Tutor] how to unique the string

2011-10-22 Thread lina
On 23 Oct, 2011, at 0:22, Devin Jeanpierre jeanpierr...@gmail.com wrote: You should be able to do this yourself, with the help of the following link: http://docs.python.org/library/stdtypes.html#set Thanks. Is this a homework question? No. Devin On Sat, Oct 22, 2011 at 12:09 PM,

[Tutor] python telnet

2011-10-22 Thread Rayon
From: Rayon [mailto:ra...@gtt.co.gy] Sent: 21 October 2011 18:53 To: 'tutor@python.org' Subject: python telnet Can I connect to a telnet session and return data without disconnecting the data session. Regards Rayon ___ Tutor

Re: [Tutor] python telnet

2011-10-22 Thread Tom Tucker
Take a look at pyexpect. I have used this mod to ssh into juniper firewalls, excute a command, save results and exit. Instead of exiting you can drop down to interactive mode. On Oct 22, 2011 3:40 PM, Rayon evosw...@hotmail.com wrote: ** ** ** ** ** ** *From:* Rayon

Re: [Tutor] python telnet

2011-10-22 Thread Steven D'Aprano
Rayon wrote: Can I connect to a telnet session and return data without disconnecting the data session. Isn't this the same question you asked back in June? We tried to answer your question then, did you see our responses, and were they useful? At the time, you were complaining that the

[Tutor] Simple Question On A Method (in subclass)

2011-10-22 Thread Chris Kavanagh
Hello, First, thank you for providing this GREAT service, THANKS to everyone who contributes. It's greatly appreciated. . .I'm new to Python (2.7, Win XP) new to programming in general. I have been studying on my own for about a month now. I believe I have a good grasp of the basics.

Re: [Tutor] Simple Question On A Method (in subclass)

2011-10-22 Thread Dave Angel
On 10/22/2011 06:10 PM, Chris Kavanagh wrote: Hello, First, thank you for providing this GREAT service, THANKS to everyone who contributes. It's greatly appreciated. . .I'm new to Python (2.7, Win XP) new to programming in general. I have been studying on my own for about a month now. I

Re: [Tutor] Simple Question On A Method (in subclass)

2011-10-22 Thread Alan Gauld
On 22/10/11 23:10, Chris Kavanagh wrote: My question is regarding the tell methods in the subclasses,the code {SchoolMember.tell(self)}, in the class Teacher Student. I just don't understand what this is doing? Calling the first method {def tell} from the parent class, I assume? Thats right,

Re: [Tutor] python telnet

2011-10-22 Thread Rayon
Well what I am doing is connecting to a telnet session sending some commands, exiting and returning some data. What I would to do is send the commands and return the data without exiting the session. I would like to keep the same session and just send commands and return data. #!/usr/bin/env

Re: [Tutor] python telnet

2011-10-22 Thread Steven D'Aprano
Rayon wrote: Well what I am doing is connecting to a telnet session sending some commands, exiting and returning some data. What I would to do is send the commands and return the data without exiting the session. I would like to keep the same session and just send commands and return data.

Re: [Tutor] python telnet

2011-10-22 Thread Rayon
Thanks I will try it and post the code, looks like what I need. -Original Message- From: tutor-bounces+evosweet=hotmail@python.org [mailto:tutor-bounces+evosweet=hotmail@python.org] On Behalf Of Steven D'Aprano Sent: 22 October 2011 21:13 To: tutor@python.org Subject: Re: [Tutor]

[Tutor] Praser

2011-10-22 Thread Henry
Hi Steven, First of all, I want to able to download the data from the web into the database. Here is the part of the link: http://boc.quotepower.com/web/bochk/stocks_mktTransactions.jsp?lang=endomain=NCBHKrand=-74344993lastLevel1Name=nav_stockslastStock=5 I hope I can use the download data to