Re: [Tutor] line continuation characters

2011-06-20 Thread Lisi
On Monday 20 June 2011 00:03:47 Steven D'Aprano wrote: > 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 t

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

2011-06-20 Thread Peter Otten
Gerhardus Geldenhuis wrote: > 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 =

Re: [Tutor] line continuation characters

2011-06-20 Thread Alan Gauld
"Lisi" wrote It is not the error message that is unclear, it was the state of my knowledge. I did not know that \ was a line continuation character, I sympathise. I had been programming for about 5 years before I came across line continuation characters. For me it was while reviewing someon

Re: [Tutor] Communicating Between Programs Using Raw Inputs (con'd)

2011-06-20 Thread Christopher King
Well, that's a trick me and jake learned in a book to stop the program from changing. On Saturday, June 18, 2011, aditya wrote: > > > On Sat, Jun 18, 2011 at 9:35 PM, Jacob Bender wrote: > > Dear Tutors, > > Alright, I'm using linux (ubuntu) and I took all of your advice and I got > something t

Re: [Tutor] Main Function

2011-06-20 Thread Christopher King
Looks all good except for this: while guess == the_number: Since you break out at the end, an if statement would be a more logical choice. and also: if tries == 4: print("\nYou fail!") input("\n\nPress the enter key to exit.") break you don't need to break because t

[Tutor] html files to pdf document

2011-06-20 Thread arun kumar
HI, i have a some 100 plus html individual files.I want to convert them to a single pdf document programatically. How to convert them in python. Are there any functions,modules or libraries for python to achieve this. -- Thank you Arun Kumar http://clicknscroll.blogspot.com ___

Re: [Tutor] nitinchandra rubbish on list

2011-06-20 Thread Christopher King
wait a minute, I clicked the link but didn't submit my info, does that mean my email will start corrupting the list now? On Mon, Jun 20, 2011 at 2:31 AM, nitin chandra wrote: > Thank you. > > Nitin > > On Mon, Jun 20, 2011 at 5:17 AM, Steven D'Aprano > wrote: > > nitin chandra wrote: > >> > >> H

Re: [Tutor] Communicating Between Programs Using Raw Inputs (con'd)

2011-06-20 Thread Christopher King
Also, we tried removing the raw input, but it wouldn't print correct On Sat, Jun 18, 2011 at 9:55 PM, aditya wrote: > > > On Sat, Jun 18, 2011 at 9:35 PM, Jacob Bender wrote: > >> Dear Tutors, >> >> Alright, I'm using linux (ubuntu) and I took all of your advice and I got >> something that works

Re: [Tutor] html files to pdf document

2011-06-20 Thread Timo
On 20-06-11 17:34, arun kumar wrote: HI, i have a some 100 plus html individual files.I want to convert them to a single pdf document programatically. How to convert them in python. Are there any functions,modules or libraries for python to achieve this. Just a question, but did you use Googl

Re: [Tutor] html files to pdf document

2011-06-20 Thread Michiel Overtoom
On Jun 20, 2011, at 18:58, Timo wrote: > On 20-06-11 17:34, arun kumar wrote: >> HI, i have a some 100 plus html individual files.I want to convert them to >> a single pdf document programatically. How to convert them in python. Are >> there any functions,modules or libraries for python to ac

Re: [Tutor] html files to pdf document

2011-06-20 Thread Walter Prins
Hello, On 20 June 2011 18:11, Michiel Overtoom wrote: > > On Jun 20, 2011, at 18:58, Timo wrote: > > > On 20-06-11 17:34, arun kumar wrote: > >> HI, i have a some 100 plus html individual files.I want to convert them > to a single pdf document programatically. How to convert them in python. >

Re: [Tutor] html files to pdf document

2011-06-20 Thread Michiel Overtoom
On Jun 21, 2011, at 00:19, Walter Prins wrote: > For reference, for me the top hit is http://www.xhtml2pdf.com/ which does > indeed look like it might do the job (and is a pure python solution.) I get five SERP pages with tons of Stackoverflow hits, but not one for www.xhtml2pdf.com! I think

[Tutor] Socket Programming issue

2011-06-20 Thread aditya
This is a small client-server program in which i am using a Vbscript program to check for connectivity of 2 machines and write the output to a text file whether it connectes or not , for example the contents of the file *output.txt* are 192.168.1.2 is connected 192.168.1.10 is not connected No