[Tutor] Python Help

2015-04-14 Thread Janelle Harb
Hello! I have a Mac and idle refuses to quit no matter what I try to do. What should I do? Thank you! -Janelle ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Regular expression on python

2015-04-14 Thread Peter Otten
Steven D'Aprano wrote: On Mon, Apr 13, 2015 at 02:29:07PM +0200, jarod...@libero.it wrote: Dear all. I would like to extract from some file some data. The line I'm interested is this: Input Read Pairs: 2127436 Both Surviving: 1795091 (84.38%) Forward Only Surviving: 17315 (0.81%) Reverse

Re: [Tutor] Python Help

2015-04-14 Thread Alan Gauld
On 14/04/15 02:39, Janelle Harb wrote: Hello! I have a Mac and idle refuses to quit no matter what I try to do. What should I do? You can start by giving us some specific examples of things you did that didn't work. Starting with the obvious: 1) Did you click the little close icon? 2)

Re: [Tutor] Regular expression on python

2015-04-14 Thread Steven D'Aprano
On Tue, Apr 14, 2015 at 10:00:47AM +0200, Peter Otten wrote: Steven D'Aprano wrote: I swear that Perl has been a blight on an entire generation of programmers. All they know is regular expressions, so they turn every data processing problem into a regular expression. Or at least they

Re: [Tutor] Regular expression on python

2015-04-14 Thread Peter Otten
Steven D'Aprano wrote: On Tue, Apr 14, 2015 at 10:00:47AM +0200, Peter Otten wrote: Steven D'Aprano wrote: I swear that Perl has been a blight on an entire generation of programmers. All they know is regular expressions, so they turn every data processing problem into a regular

Re: [Tutor] Regular expression on python

2015-04-14 Thread Alan Gauld
On 14/04/15 13:21, Steven D'Aprano wrote: although I would probably want to write it out in verbose mode just in case the requirements did change: r(?x)(?# verbose mode) (.+?): (?# capture one or more character, followed by a colon) \s+ (?# one or more whitespace)

Re: [Tutor] Regular expression on python

2015-04-14 Thread Mark Lawrence
On 15/04/2015 00:49, Alan Gauld wrote: On 14/04/15 13:21, Steven D'Aprano wrote: although I would probably want to write it out in verbose mode just in case the requirements did change: r(?x)(?# verbose mode) (.+?): (?# capture one or more character, followed by a colon) \s+

Re: [Tutor] Regular expression on python

2015-04-14 Thread Steven D'Aprano
On Wed, Apr 15, 2015 at 12:49:26AM +0100, Alan Gauld wrote: New one on me. Where does one find out about verbose mode? I don't see it in the re docs? I see an re.X flag but while it seems to be similar in purpose yet it is different to your style above (no parens for example)? I presume it

[Tutor] where is the wsgi server root?

2015-04-14 Thread Jim Mooney
I set up a simple python wsgi server on port 8000, which works, but where the heck is the server root? Is there a physical server root I can simply put a python program in, as I put a html program into the wampserver root, and see it in a browser on localhost:port 8000, or do I need to do a bit

Re: [Tutor] where is the wsgi server root?

2015-04-14 Thread Alan Gauld
On 14/04/15 17:56, Jim Mooney wrote: simplest thing to see if I can get python on a web page since I'm used to making them. Or if the root is virtual how do I set up a physical root? I'm guessing; but I'd expect it to be the current directory when you started the server. try adding a print(

Re: [Tutor] where is the wsgi server root?

2015-04-14 Thread Joel Goldstick
On Tue, Apr 14, 2015 at 12:56 PM, Jim Mooney cybervigila...@gmail.com wrote: I set up a simple python wsgi server on port 8000, which works, but where the heck is the server root? Is there a physical server root I can simply put a python program in, as I put a html program into the wampserver