Re: [Tutor] Closing triple quotation marks.

2011-06-19 Thread Alan Gauld
"Lisi" wrote It does indeed. Thank you, both of you. I have clearly not got the terms command, method, function (and feature?) clearly sorted out in my mind, so that is obviously where I need to go. I am supposed to be researching import, but I have not yet succeeded in seeing why it is a

Re: [Tutor] Closing triple quotation marks.

2011-06-19 Thread Lisi
On Sunday 19 June 2011 08:39:43 Alan Gauld wrote: > "Lisi" wrote > > > It does indeed. Thank you, both of you. I have clearly not got the > > terms > > command, method, function (and feature?) clearly sorted out in my > > mind, so > > that is obviously where I need to go. I am supposed to be >

Re: [Tutor] using configobj package to output quoted strings

2011-06-19 Thread Alan Gauld
"Steven D'Aprano" wrote ...The only good reason to escape a quotation mark is if you need *both* quote marks in a single string: "John Cleese said, \"'e's not dead, 'e's just pining for the fjords!\"" And even here you can use outer triple quotes if you prefer: '''John Cleese said, "'e's

[Tutor] regex woes in finding an ip and GET string

2011-06-19 Thread Gerhardus Geldenhuis
Hi I am trying to write a small program that will scan my access.conf file and update iptables to block anyone looking for stuff that they are not supposed to. The code: #!/usr/bin/python import sys import re def extractoffendingip(filename): f = open(filename,'r') filecontents = f.read() #19

Re: [Tutor] using configobj package to output quoted strings

2011-06-19 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Alex Hall wrote: On 6/18/11, Steven D'Aprano wrote: Alex Hall wrote: Hello all, I am using the configobj package to handle a ridiculously simple ini What's configobj? >>> import configobj Traceback (most recent call last): File "", line 1, in ImportError: N

Re: [Tutor] regex woes in finding an ip and GET string

2011-06-19 Thread Peter Lavelle
Looking at the regex you have to match an IP address, I think you would need to put a range limit on each of the four octets you are searching for (as each one would be between 1 and 3 digits long.) For example: r = re.match(r"\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b",line) has worked for me.

Re: [Tutor] BF Program hangs

2011-06-19 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Kaustubh Pratap chand wrote: > Hello i made this program which interprets brainf*** > > But i don't understand why it doesn't endsand also it doesn't print anything > > import sys > > cell=[0] * 3 > code_pointer=0 > cell_pointer=0 > close_brace_pos=

Re: [Tutor] Closing triple quotation marks.

2011-06-19 Thread col speed
On 19 June 2011 14:46, Lisi wrote: > On Sunday 19 June 2011 08:39:43 Alan Gauld wrote: > > "Lisi" wrote > > > > > It does indeed. Thank you, both of you. I have clearly not got the > > > terms > > > command, method, function (and feature?) clearly sorted out in my > > > mind, so > > > that is

Re: [Tutor] Closing triple quotation marks.

2011-06-19 Thread Lisi
On Sunday 19 June 2011 14:23:25 col speed wrote: > On 19 June 2011 14:46, Lisi wrote: > > On Sunday 19 June 2011 08:39:43 Alan Gauld wrote: > > > "Lisi" wrote > > > > > > > It does indeed. Thank you, both of you. I have clearly not got the > > > > terms > > > > command, method, function (and fe

Re: [Tutor] regex woes in finding an ip and GET string

2011-06-19 Thread Válas Péter
2011/6/19 Gerhardus Geldenhuis > f = open(filename,'r') > filecontents = f.read() > Try f.read().splitlines() instead. > tuples = re.findall(r'^(\d+\.\d+\.\d+\.\d+).*\"GET(.*)HTTP', > filecontents) > This searches the beginning of the lines, but you downloaded the whole page as one strin

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Alan Gauld
"Válas Péter" wrote Each time I send a message to this list, I get an autoreply like this. No, I won't add myself to any stupid guestlists to use a public list. Could a list moderator please show this user the exit? The exit instructions are on the end of every email. But this is not comi

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Alexandre Conrad
2011/6/19 Steven D'Aprano : > I've been sending many lists to this list, and haven't received any such > autoreplies. I suspect that you are getting them because you are replying > directly to the sender, and CC'ing the list. > > Stop replying to the sender, and the problem will probably go away.

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Lisi
On Sunday 19 June 2011 15:10:51 Válas Péter wrote: > Each time I send a message to this list, I get an autoreply like this. No, > I won't add myself to any stupid guestlists to use a public list. Could a > list moderator please show this user the exit? The solution is simple. Never reply to email

[Tutor] nitinchandra rubbish on list

2011-06-19 Thread Válas Péter
Each time I send a message to this list, I get an autoreply like this. No, I won't add myself to any stupid guestlists to use a public list. Could a list moderator please show this user the exit? -- Továbbított levél -- Feladó: Dátum: 2011. június 19. 15:45 Tárgy: Re: Re: [Tutor]

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Brett Ritter
On Sun, Jun 19, 2011 at 11:33 AM, Alexandre Conrad wrote: > 2011/6/19 Steven D'Aprano : >> Stop replying to the sender, and the problem will probably go away. > I always "reply to all", which replies to the sender and CC the list > (just like this email) and I can't recall of such behavior. All w

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Válas Péter
No, this does not happen if I write to a particular person; this very mail in the beginning of the thread was sent to the tutor list only, and I got the same answer. I am going to get it now again. 2011/6/19 Alan Gauld > > But this is not coming frrom the Python tutor list > but from boxbe.com -

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Steven D'Aprano
Válas Péter wrote: Each time I send a message to this list, I get an autoreply like this. No, I won't add myself to any stupid guestlists to use a public list. Could a list moderator please show this user the exit? I've been sending many lists to this list, and haven't received any such autore

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread col speed
2011/6/19 Válas Péter > Each time I send a message to this list, I get an autoreply like this. No, > I won't add myself to any stupid guestlists to use a public list. Could a > list moderator please show this user the exit? > > -- Továbbított levél -- > Feladó: > Dátum: 2011. jún

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Alexandre Conrad
2011/6/19 Alexandre Conrad : > 2011/6/19 Steven D'Aprano : >> I've been sending many lists to this list, and haven't received any such >> autoreplies. I suspect that you are getting them because you are replying >> directly to the sender, and CC'ing the list. >> >> Stop replying to the sender, and

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread delegbede
The problem with boxbe is a nightmare for everybody. It is a mail application by a company that gets into the ways of people ones the receiver of your mail has boxbe running on his system. Sadly my yahoomail has boxbe but that's not my mail on this list. The most annoying part is that you can't

[Tutor] nitinchandra rubbish on list

2011-06-19 Thread nitin chandra
Hello All, MY Sincerest APOLOGIES i had joined a a mail box management services... But unfortunately It started interfering with my Gmail mail box. But i was completely unaware that It was also effecting the others on the list. Most embarrassing moment when I found out how it was effecting o

[Tutor] SORRY - nitinchandra rubbish on list

2011-06-19 Thread nitin chandra
On Sun, Jun 19, 2011 at 11:52 PM, nitin chandra wrote: > Hello All, > > MY Sincerest APOLOGIES i had joined a a mail box management services... > But unfortunately It started interfering with my Gmail mail box. > > But i was completely unaware that It was also effecting the others on the > li

Re: [Tutor] Seattle PyCamp 2011

2011-06-19 Thread Chris Calloway
On 6/17/2011 11:03 PM, Noah Hall wrote: On Sat, Jun 18, 2011 at 2:15 AM, Steven D'Aprano wrote: Noah Hall wrote: Just a note, but are these questions jokes? Know how to use a text editor (not a word processor, but a text editor)? Know how to use a browser to download a file? Know how to run

Re: [Tutor] Seattle PyCamp 2011

2011-06-19 Thread Noah Hall
On Sun, Jun 19, 2011 at 6:47 PM, Chris Calloway wrote: > On 6/17/2011 11:03 PM, Noah Hall wrote: >> >> On Sat, Jun 18, 2011 at 2:15 AM, Steven D'Aprano >>  wrote: >>> >>> Noah Hall wrote: >>> Just a note, but are these questions jokes? > Know how to use a text editor (not a word proc

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Válas Péter
2011/6/19 nitin chandra > > MY Sincerest APOLOGIES All right, I accept, and let's see what happens now. :-) P. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Seattle PyCamp 2011

2011-06-19 Thread Noah Hall
> 1984 was not to be taken literally, of course. ;) > > > Well, if you decide that in this day and age that asking whether > someone knows how to use a browser to download files, or if someone > knows how to install a program, then that's entirely up to you. I am > merely in disbelief that you coul

[Tutor] line continuation characters

2011-06-19 Thread Lisi
I am having problems with line continuation characters. Error message: SyntaxError: unexpected character after line continuation character I have succeeded in moving the position of the complaint, but am currently well and truly stuck. I have read up about it and now (I hope!) know what to do

Re: [Tutor] line continuation characters

2011-06-19 Thread Válas Péter
2011/6/19 Lisi > I am having problems with line continuation characters. Error message: > > SyntaxError: unexpected character after line continuation character > You should write here the line where the problem is. Likely that you have written something after \. If you place a \ at the end of l

Re: [Tutor] Seattle PyCamp 2011

2011-06-19 Thread Chris Calloway
On 6/19/2011 3:53 PM, Noah Hall wrote: 1984 was not to be taken literally, of course. ;) Well, if you decide that in this day and age that asking whether someone knows how to use a browser to download files, or if someone knows how to install a program, then that's entirely up to you. I am mere

Re: [Tutor] Seattle PyCamp 2011

2011-06-19 Thread Alan Gauld
"Noah Hall" wrote Well, if you decide that in this day and age that asking whether someone knows how to use a browser to download files, or if someone knows how to install a program, This is not out of place. I have experienced it myself with users of my web tutorial. I have had several

Re: [Tutor] line continuation characters

2011-06-19 Thread Steven D'Aprano
Lisi wrote: I am having problems with line continuation characters. Error message: SyntaxError: unexpected character after line continuation character Then delete it ;) Seriously. You have your editor open, right? Go to the line where the error is reported. It will look something like this:

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Steven D'Aprano
nitin chandra wrote: Hello All, MY Sincerest APOLOGIES i had joined a a mail box management services... But unfortunately It started interfering with my Gmail mail box. Thanks for fixing this! -- Steven ___ Tutor maillist - Tutor@python.org

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread nitin chandra
Thank you. Nitin On Mon, Jun 20, 2011 at 5:17 AM, Steven D'Aprano wrote: > nitin chandra wrote: >> >> Hello All, >> >> MY Sincerest APOLOGIES i had joined a a mail box management >> services... >> But unfortunately It started interfering with my Gmail mail box. > > Thanks for fixing this! >