Re: [Tutor] Testing a string to see if it contains a substring

2015-01-21 Thread Mark Lawrence
On 21/01/2015 18:14, dw wrote: Hello Python Friends. I have a string array, called "line_array". There may be up to 50 or more elements in the array. So: - line_array[1] may contain "01/04/2013 10:43 AM17,410,217 DEV-ALL-01-04-13.rlc\n" - line_array[2] may contain "01/25/2013 03:21 PM

Re: [Tutor] Testing a string to see if it contains a substring

2015-01-21 Thread Danny Yoo
How large will your array be in production? If it going to be very large, you may want to consider a database. You're simulating a collection of records as an in-memory sequence of flat strings. This design won't scale, so if you are working with a lot of data, you may want to look into a dedicat

Re: [Tutor] Testing a string to see if it contains a substring

2015-01-21 Thread Steven D'Aprano
On Wed, Jan 21, 2015 at 10:14:42AM -0800, dw wrote: > Hello Python Friends. > I have a string array, called "line_array". Do you mean a list of strings? "String array" is not a standard Python term, it could mean something from the array module, from numpy, or something completely different. It

Re: [Tutor] Testing a string to see if it contains a substring

2015-01-21 Thread Alan Gauld
On 21/01/15 18:14, dw wrote: - line_array[1] may contain "01/04/2013 10:43 AM17,410,217 DEV-ALL-01-04-13.rlc\n" - line_array[2] may contain "01/25/2013 03:21 PM17,431,230 DEV-ALL-01-25-2013.rlc\n" - line_array[3] may contain "\n" I want to retain all elements which are valid (

[Tutor] Testing a string to see if it contains a substring

2015-01-21 Thread dw
Hello Python Friends. I have a string array, called "line_array". There may be up to 50 or more elements in the array. So: - line_array[1] may contain "01/04/2013 10:43 AM17,410,217 DEV-ALL-01-04-13.rlc\n" - line_array[2] may contain "01/25/2013 03:21 PM17,431,230 DEV-ALL-01-25-2

Re: [Tutor] How to paste text from from clipboard to command line?

2015-01-21 Thread Alan Gauld
On 21/01/15 16:42, Richard D. Moores wrote: On Wed, Jan 21, 2015 at 8:10 AM, Steven D'Aprano wrote: https://duckduckgo.com/?q=windows+command+line+paste Ah, check QuickEdit Mode in Properties. Thanks very much. I don't think you specifically need Quick Edit turned on, you can just use the E

Re: [Tutor] How to paste text from from clipboard to command line?

2015-01-21 Thread Mark Lawrence
On 21/01/2015 16:42, Richard D. Moores wrote: On Wed, Jan 21, 2015 at 8:10 AM, Steven D'Aprano wrote: https://duckduckgo.com/?q=windows+command+line+paste Ah, check QuickEdit Mode in Properties. Thanks very much. Better yet download ConEmu and use CTRL-V -- My fellow Pythonistas, ask not w

Re: [Tutor] How to paste text from from clipboard to command line?

2015-01-21 Thread Richard D. Moores
On Wed, Jan 21, 2015 at 8:10 AM, Steven D'Aprano wrote: > https://duckduckgo.com/?q=windows+command+line+paste Ah, check QuickEdit Mode in Properties. Thanks very much. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription option

Re: [Tutor] How to paste text from from clipboard to command line?

2015-01-21 Thread Steven D'Aprano
On Wed, Jan 21, 2015 at 08:00:32AM -0800, Richard D. Moores wrote: > Thanks, Ah, got it! Your question was in the subject line. "How to paste text from from clipboard to command line?" That depends on what command line you are using, and doesn't really have anything to do with Python. I'm not

Re: [Tutor] How to paste text from from clipboard to command line?

2015-01-21 Thread Richard D. Moores
On Wed, Jan 21, 2015 at 8:04 AM, Steven D'Aprano wrote: > Huh? Thanks for what? Please note the subject line. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to paste text from from clipboard to command line?

2015-01-21 Thread Steven D'Aprano
On Wed, Jan 21, 2015 at 08:00:32AM -0800, Richard D. Moores wrote: > Thanks, Huh? Thanks for what? -- Steve ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] How to paste text from from clipboard to command line?

2015-01-21 Thread Richard D. Moores
Thanks, Dick Moores Python 3.4.1 Win 7 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Learning class code and function (Alan Gauld)

2015-01-21 Thread jarod...@libero.it
>I'd also question why you seem to have a function that has the class >name in its name? Should that function not be a method of the class? >Or is it part of some third party library perhaps? Thanks for the clarification!! Could you please make an example of this two condition I still try to devo