Re: [Tutor] Closing triple quotation marks.

2011-06-19 Thread Lisi
On Saturday 18 June 2011 15:58:23 Alan Gauld wrote: Lisi lisi.re...@gmail.com wrote But I still can't write to the file. If I do: target.write(line1) The value of the variable line1 is written to the file. That will work provided line1 is a string. But if I put the three

Re: [Tutor] Closing triple quotation marks.

2011-06-19 Thread Alan Gauld
Lisi lisi.re...@gmail.com 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

Re: [Tutor] Closing triple quotation marks.

2011-06-19 Thread Lisi
On Sunday 19 June 2011 08:39:43 Alan Gauld wrote: Lisi lisi.re...@gmail.com 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

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

2011-06-19 Thread Alan Gauld
Steven D'Aprano st...@pearwood.info 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

[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()

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'Apranost...@pearwood.info 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 stdin, line

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. I

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=0

Re: [Tutor] Closing triple quotation marks.

2011-06-19 Thread col speed
On 19 June 2011 14:46, Lisi lisi.re...@gmail.com wrote: On Sunday 19 June 2011 08:39:43 Alan Gauld wrote: Lisi lisi.re...@gmail.com 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

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 lisi.re...@gmail.com wrote: On Sunday 19 June 2011 08:39:43 Alan Gauld wrote: Lisi lisi.re...@gmail.com wrote It does indeed. Thank you, both of you. I have clearly not got the terms command,

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

2011-06-19 Thread Válas Péter
2011/6/19 Gerhardus Geldenhuis gerhardus.geldenh...@gmail.com 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

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Alan Gauld
Válas Péter suli...@postafiok.hu 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.

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Alexandre Conrad
2011/6/19 Steven D'Aprano st...@pearwood.info: 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

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 emails

[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ó: nore...@boxbe.com Dátum: 2011. június 19. 15:45

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Brett Ritter
On Sun, Jun 19, 2011 at 11:33 AM, Alexandre Conrad alexandre.con...@gmail.com wrote: 2011/6/19 Steven D'Aprano st...@pearwood.info: 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

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 alan.ga...@btinternet.com But this is not coming frrom the Python tutor

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

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread col speed
2011/6/19 Válas Péter suli...@postafiok.hu 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ó:

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Alexandre Conrad
2011/6/19 Alexandre Conrad alexandre.con...@gmail.com: 2011/6/19 Steven D'Aprano st...@pearwood.info: 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.

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

[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

[Tutor] SORRY - nitinchandra rubbish on list

2011-06-19 Thread nitin chandra
On Sun, Jun 19, 2011 at 11:52 PM, nitin chandra nitinchand...@gmail.com 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

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'Apranost...@pearwood.info 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

Re: [Tutor] Seattle PyCamp 2011

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

Re: [Tutor] nitinchandra rubbish on list

2011-06-19 Thread Válas Péter
2011/6/19 nitin chandra nitinchand...@gmail.com 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:

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 could find

[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 lisi.re...@gmail.com 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

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

Re: [Tutor] Seattle PyCamp 2011

2011-06-19 Thread Alan Gauld
Noah Hall enali...@gmail.com 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

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 -