Re: [Tutor] Python Lists--A Suggestion

2009-04-08 Thread Wayne Watson
Title: Signature.html Tried it. No doubt there are many. Kent Johnson wrote: On Wed, Apr 8, 2009 at 4:27 PM, Wayne Watson wrote: Sounds fine to me. Is that actually a real link though? If so, who posts there. If not, I'd suggest, www.pytutor-sendspace.com. Yes it is r

Re: [Tutor] Python Lists--A Suggestion

2009-04-08 Thread Wayne Watson
Title: Signature.html In my case, it certainly does. In fact, my posts are refused for other python related NGs. :-) From what I can tell via googling, it's not just me. Emile van Sebille wrote: Wayne Watson wrote: Perhaps the Pyton organization could produce their mail lists, if they ha

Re: [Tutor] Consolidate reused code blocks

2009-04-08 Thread David
Kent Johnson wrote: On Wed, Apr 8, 2009 at 8:38 PM, David wrote: Hi Everyone, I have a simple todo list program with functions to add, delete, edit and print out a list of todo's. I need to understand how to remove the same blocks of code I use in each function. Should I create a class for the

[Tutor] [Fwd: Re: Consolidate reused code blocks]

2009-04-08 Thread David
-- Powered by Gentoo GNU/Linux http://linuxcrazy.com --- Begin Message --- Kent Johnson wrote: On Wed, Apr 8, 2009 at 8:38 PM, David wrote: Hi Everyone, I have a simple todo list program with functions to add, delete, edit and print out a list of todo's. I need to understand how to remove th

Re: [Tutor] Consolidate reused code blocks

2009-04-08 Thread Kent Johnson
On Wed, Apr 8, 2009 at 8:38 PM, David wrote: > Hi Everyone, > > I have a simple todo list program with functions to add, delete, edit and > print out a list of todo's. I need to understand how to remove the same > blocks of code I use in each function. Should I create a class for the same > block

[Tutor] Consolidate reused code blocks

2009-04-08 Thread David
Hi Everyone, I have a simple todo list program with functions to add, delete, edit and print out a list of todo's. I need to understand how to remove the same blocks of code I use in each function. Should I create a class for the same block of code I am including in each function? Here are two

Re: [Tutor] Python Lists--A Suggestion

2009-04-08 Thread Kent Johnson
On Wed, Apr 8, 2009 at 4:27 PM, Wayne Watson wrote: > Sounds fine to me. Is that actually a real link though? If so, who posts > there. If not, I'd suggest, www.pytutor-sendspace.com. Yes it is real, try it! It's open to the public so anyone can post. Kent > Kent Johnson wrote: > > On Tue, Apr

Re: [Tutor] problem in replacing regex

2009-04-08 Thread Moos Heintzen
Hi, You can do the substitution in many ways. You can first search for bare account numbers and substitute them with urls. Then substitute urls into tags. To substitute account numbers that aren't in urls, you simply substitutes account numbers if they don't start with a "/", as you have been t

Re: [Tutor] Python Lists--A Suggestion

2009-04-08 Thread Emile van Sebille
Wayne Watson wrote: Perhaps the Pyton organization could produce their mail lists, if they have any control over them. Maybe that's the source of the inconsistency? Has anyone pointed out that posting through gmane eliminates the inconsistency? Emile __

Re: [Tutor] Python Lists--A Suggestion

2009-04-08 Thread Wayne Watson
Title: Signature.html Sounds fine to me. Is that actually a real link though? If so, who posts there. If not, I'd suggest, www.pytutor-sendspace.com. Kent Johnson wrote: On Tue, Apr 7, 2009 at 11:55 PM, Wayne Watson wrote: My suggestion is aimed at those who want to use graphic

Re: [Tutor] Python Lists--A Suggestion

2009-04-08 Thread Kent Johnson
On Tue, Apr 7, 2009 at 11:55 PM, Wayne Watson wrote: > My suggestion is aimed at those who want to use graphic > material to support their questions or problems. Make a postable web site > called something like www.python-tutor-pix-post.net, where one could easily > put something there for 30 days

Re: [Tutor] Creating an uncompile module?

2009-04-08 Thread Kent Johnson
On Wed, Apr 8, 2009 at 1:23 PM, Muneeb Akhter wrote: > I am registered on your list serv. so I geuss I could get some help on a > personal project that will read bytecode for python 2.6 and spit out the > original code or atleast the steps. Does something like this already exist > (must be somethi

[Tutor] Creating an uncompile module?

2009-04-08 Thread Muneeb Akhter
I am registered on your list serv. so I geuss I could get some help on a personal project that will read bytecode for python 2.6 and spit out the original code or atleast the steps. Does something like this already exist (must be something very similar)? Or could you give me some information of

Re: [Tutor] why is unicode converted file double spaced?

2009-04-08 Thread Pirritano, Matthew
Excellent! Thanks! After specifying the output encoding as cp1252 I ran this short syntax and got zero errors. Thanks to Jon Peck from the SPSS list who also weighed in. Thanks matt Matthew Pirritano, Ph.D. Research Analyst IV Medical Services Initiative (MSI) Orange County Health Care Agency (

Re: [Tutor] problem in replacing regex

2009-04-08 Thread Kumar
Hello Denis/Kent, Sorry if I created any confusion. Here is my value: myString = """ https://hello.com/accid/12345-12 /12345-12 http://sadfsdf.com/12345-12 http://sadfsdf.com/asdf/asdf/asdf/12345-12 12345-12 """ so above statements are the value of myString (one string only). I couldn't try den

Re: [Tutor] Regex for a variable within a string

2009-04-08 Thread Kent Johnson
On Wed, Apr 8, 2009 at 6:28 AM, David Cash wrote: > Hi, I'm new to python and have decided to develop a web crawler / file > downloader as my first application. I am at the stage where the script > requests a page and parses the page for URLs, then prints them out. However, > I'd like to change my

Re: [Tutor] why is unicode converted file double spaced?

2009-04-08 Thread Kent Johnson
On Wed, Apr 8, 2009 at 3:55 AM, spir wrote: > Le Tue, 7 Apr 2009 17:54:42 -0400, > Kent Johnson s'exprima ainsi: > >> >     outp.write(outLine.strip()+'\n') > >> UnicodeEncodeError: 'ascii' codec can't encode characters in position >> 640-641: ordinal not in range(128) > > Hem, sorry for stepping

Re: [Tutor] problem in replacing regex

2009-04-08 Thread Kent Johnson
> Kumar s'exprima ainsi: > >> Hi Danis, >> >> Just to be more specific that I can add [^/] in my expression which will >> successfully work for url (i.e. http://sdfs/123-34) but it will also work >> for non url (i.e. /123-34 ) so u am just trying it to make it specific for >> url only >> I have al

[Tutor] Regex for a variable within a string

2009-04-08 Thread David Cash
Hi, I'm new to python and have decided to develop a web crawler / file downloader as my first application. I am at the stage where the script requests a page and parses the page for URLs, then prints them out. However, I'd like to change my current regex that greps for 'http' to one that will grep

Re: [Tutor] why is unicode converted file double spaced?

2009-04-08 Thread spir
Le Tue, 7 Apr 2009 17:54:42 -0400, Kent Johnson s'exprima ainsi: > >     outp.write(outLine.strip()+'\n') > UnicodeEncodeError: 'ascii' codec can't encode characters in position > 640-641: ordinal not in range(128) Hem, sorry for stepping in the thread. Isn't the issue that lines previously de

Re: [Tutor] problem in replacing regex

2009-04-08 Thread spir
Le Wed, 8 Apr 2009 12:31:31 +0530, Kumar s'exprima ainsi: > Hi Danis, > > Just to be more specific that I can add [^/] in my expression which will > successfully work for url (i.e. http://sdfs/123-34) but it will also work > for non url (i.e. /123-34 ) so u am just trying it to make it specific