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

2011-10-23 Thread Marc Tompkins
On Sun, Oct 23, 2011 at 8:08 PM, Chris Kavanagh wrote: > So we have {member.tell} as the last line of code. So trying to understand > this piece of code, {member} the variable is considered an object? Therefore > we can combine it with a function {tell()} using dot notation?? Is this > correct???

[Tutor] reg current work in pycrypto

2011-10-23 Thread nivedita datta
Hi all, Can anyone tell me about some projects or applications which has been built using pycrypto. Also I would like to know about any ongoing/past project or application development in pycrypto. I would like to have the following information on pycrypto : 1. some attention grabbing fact/detail

Re: [Tutor] What is wrong with my code?

2011-10-23 Thread apometron
Sorry to continue discussing my thread on this list, I already subbed on the Tutor list but I need to reply and if possible, some ideas of why it dont works. Now it is another thing, entirely. Rename1.py and Rename2.py works, but why Rename3.py dont works? http://pastebin.com/dExFtTkp Thanks

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

2011-10-23 Thread Chris Kavanagh
On 10/23/2011 8:28 PM, Alan Gauld wrote: On 24/10/11 00:54, Chris Kavanagh wrote: Speaking of the last line of code, I have a question about that also. The last line should have been (without my error) {member.tell()}. My question is, why couldn't this last line have been {print member}?? I

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

2011-10-23 Thread Alan Gauld
On 24/10/11 00:54, Chris Kavanagh wrote: Speaking of the last line of code, I have a question about that also. The last line should have been (without my error) {member.tell()}. My question is, why couldn't this last line have been {print member}?? It could have been, but the output would have

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

2011-10-23 Thread Chris Kavanagh
On 10/23/2011 6:22 PM, Dave Angel wrote: (please do REPLY-ALL, or at least add the mailing list to the recipient list. Otherwise, only one person will see the message. I'm forwarding it to the group with my comments added.) Original Message Subject: Re: [Tutor] Simple Questi

Re: [Tutor] how to unique the string

2011-10-23 Thread Dave Angel
On 10/23/2011 08:01 AM, lina wrote: On Sun, Oct 23, 2011 at 6:06 PM, Peter Otten<__pete...@web.de> wrote: lina wrote: tobetranslatedparts=line.strip().split() strip() is superfluous here, split() will take care of the stripping: " alpha \tbeta\n".split() ['alpha', 'beta'] for residue in

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

2011-10-23 Thread Dave Angel
(please do REPLY-ALL, or at least add the mailing list to the recipient list. Otherwise, only one person will see the message. I'm forwarding it to the group with my comments added.) Original Message Subject: Re: [Tutor] Simple Question On A Method (in subclass) Date: Sun,

Re: [Tutor] URLError Help.

2011-10-23 Thread Alan Gauld
On 23/10/11 15:47, Dipo Elegbede wrote: I am trying to access a url using the urllib2.urlopen() command. It does well when i run from idle but as soon as i plug into my app; it gives me this . Can we see some code that generates the error? And can we see the full error traceback? Also the OS

Re: [Tutor] Praser

2011-10-23 Thread Lie Ryan
On 10/23/2011 03:09 PM, Henry wrote: 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=en&domain=NCBHK&rand=-74344993&lastLevel1Name=nav_stocks&lastStock=

[Tutor] URLError Help.

2011-10-23 Thread Dipo Elegbede
I am trying to access a url using the urllib2.urlopen() command. It does well when i run from idle but as soon as i plug into my app; it gives me this . Is there anything I am doing wrong or a thing I should look at? -- Elegbede Muhammed Oladipupo OCA +2348077682428 +2347042171716 www.dudupay.c

Re: [Tutor] how to unique the string

2011-10-23 Thread lina
On Sun, Oct 23, 2011 at 6:06 PM, Peter Otten <__pete...@web.de> wrote: > lina wrote: > tobetranslatedparts=line.strip().split() > > strip() is superfluous here, split() will take care of the stripping: > " alpha \tbeta\n".split() > ['alpha', 'beta'] > for residue in results:    

Re: [Tutor] how to unique the string

2011-10-23 Thread Peter Otten
lina wrote: >>> tobetranslatedparts=line.strip().split() strip() is superfluous here, split() will take care of the stripping: >>> " alpha \tbeta\n".split() ['alpha', 'beta'] >>> for residue in results: >>> if residue not in unique: >>> unique[residue]=1 >>> else: >>> un

Re: [Tutor] how to unique the string

2011-10-23 Thread lina
The updated one -- following Alan's advice. #!/usr/bin/python3 import os.path mapping={} DICTIONARYFILE="dictionary.pdb" TOBETRANSLATEDFILEEXT=".out" OUTPUTFILEEXT=".txt" def generate_dict(dictionarysourcefile): for line in open(dictionarysourcefile,"r"): parts=line.strip().split(

Re: [Tutor] how to unique the string

2011-10-23 Thread lina
On Sun, Oct 23, 2011 at 5:08 PM, Alan Gauld wrote: > On 23/10/11 09:33, lina wrote: > >> I have a further question: >> > >> Welcome anyone help me transform the code to another form. > > What form would you like it transformed to? > A flow chart? Another programming language? A different style of

Re: [Tutor] how to unique the string

2011-10-23 Thread Alan Gauld
On 23/10/11 09:33, lina wrote: I have a further question: > Welcome anyone help me transform the code to another form. What form would you like it transformed to? A flow chart? Another programming language? A different style of Python (Functional programming or OOP maybe?) I'm not sure wh

Re: [Tutor] Praser

2011-10-23 Thread Alan Gauld
On 23/10/11 05:09, Henry wrote: Please delete irrelevant material from your messages. In particular do not send the entire digest content to the list. 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/b

Re: [Tutor] how to unique the string

2011-10-23 Thread lina
On Sun, Oct 23, 2011 at 12:50 AM, Steven D'Aprano wrote: > 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